zhijian 0135aa7b98 [llvm-nm] add a new option -X to specify the type of object file llvm-nm should examine
Summary:
Added a new option "-X" to specify, which type of object file should be examine.

For example:

1. "llvm-nm -X64 archive.a" only deal with the 64bit object files in the archive.a ,ignore the all 32bit object files in the archive.a
2. "llvm-nm -X32 xcoffobj32.o xcoffobj64.o " only deal with the 32bit object file "xcoffobj32.o" , 64bit object file "xcoffobj64.o" will be ignored

Reviewers: James Henderson,Fangrui Song
Differential Revision: https://reviews.llvm.org/D118193
2022-02-15 09:43:31 -05:00

15 lines
387 B
LLVM

target triple = "powerpcle-unknown-linux-gnu"
@C32 = dso_local global i32 5, align 4
@undef_var32 = external dso_local global i32, align 4
define dso_local i32 @foo32(i32 %i) #0 {
entry:
%i.addr = alloca i32, align 4
store i32 %i, i32* %i.addr, align 4
%0 = load i32, i32* %i.addr, align 4
%1 = load i32, i32* @undef_var32, align 4
%add = add nsw i32 %0, %1
ret i32 %add
}