1 ; RUN: llc -filetype=obj -mtriple=x86_64-pc-linux -o %t.o %s
2 ; RUN: llvm-nm %t.o | FileCheck --check-prefix="MANGLED" %s
3 ; RUN: llvm-nm %t.o --no-demangle | FileCheck --check-prefix="MANGLED" %s
4 ; RUN: llvm-nm -C %t.o | FileCheck --check-prefix="DEMANGLED" %s
5 ; RUN: llvm-nm --demangle %t.o | FileCheck --check-prefix="DEMANGLED" %s
7 ; RUN: llc -filetype=obj -mtriple=x86_64-apple-darwin9 -o %t.macho %s
8 ; RUN: llvm-nm %t.macho | FileCheck --check-prefix="MACHO-MANGLED" %s
9 ; RUN: llvm-nm -C %t.macho | FileCheck --check-prefix="DEMANGLED" %s
11 ; RUN: llc -filetype=obj -mtriple=x86_64-pc-win32 -o %t.coff %s
12 ; RUN: llvm-nm %t.coff | FileCheck --check-prefix="COFF-MANGLED" %s
13 ; RUN: llvm-nm -C %t.coff | FileCheck --check-prefix="COFF-DEMANGLED" %s
15 ; Show that the last of --no-demangle/--demangle wins:
16 ; RUN: llvm-nm --demangle --no-demangle %t.o | FileCheck --check-prefix="MANGLED" %s
17 ; RUN: llvm-nm --no-demangle --demangle %t.o | FileCheck --check-prefix="DEMANGLED" %s
18 ; RUN: llvm-nm --no-demangle --demangle --no-demangle %t.o | FileCheck --check-prefix="MANGLED" %s
19 ; RUN: llvm-nm --demangle --no-demangle --demangle %t.o | FileCheck --check-prefix="DEMANGLED" %s
21 define i32 @_Z3fooi(i32) #0 {
26 define float @_Z3barf(float) #0 {
28 ret float 0.000000e+00
31 define i32 @_RNvC1a3baz(i32) #0 {
36 ; MANGLED: 0000000000000020 T _RNvC1a3baz
37 ; MANGLED: 0000000000000010 T _Z3barf
38 ; MANGLED: 0000000000000000 T _Z3fooi
40 ; MACHO-MANGLED: 0000000000000020 T __RNvC1a3baz
41 ; MACHO-MANGLED: 0000000000000010 T __Z3barf
42 ; MACHO-MANGLED: 0000000000000000 T __Z3fooi
44 ; COFF-MANGLED: 00000020 T _RNvC1a3baz
45 ; COFF-MANGLED: 00000010 T _Z3barf
46 ; COFF-MANGLED: 00000000 T _Z3fooi
48 ; DEMANGLED: 0000000000000020 T a::baz
49 ; DEMANGLED: 0000000000000010 T bar(float)
50 ; DEMANGLED: 0000000000000000 T foo(int)
52 ; COFF-DEMANGLED: 00000020 T a::baz
53 ; COFF-DEMANGLED: 00000010 T bar(float)
54 ; COFF-DEMANGLED: 00000000 T foo(int)