1 ## Show that the --disassemble-functions switch takes demangled names when
2 ## --demangle is specified, otherwise the switch takes mangled names.
4 # RUN: yaml2obj %s -o %t.o
6 ## --disassemble-functions without --demangle.
7 # RUN: llvm-objdump --disassemble-functions=_Z3foov %t.o | FileCheck %s --check-prefix=MANGLED
8 # RUN: llvm-objdump --disassemble-functions='foo()' %t.o 2>&1 \
9 # RUN: | FileCheck %s --check-prefix=MANGLED-MISS
10 # RUN: llvm-objdump --disassemble-functions=foo %t.o 2>&1 \
11 # RUN: | FileCheck %s --check-prefix=MANGLED-MISS
12 # RUN: llvm-objdump --disassemble-functions='i,f' %t.o | FileCheck %s --check-prefix=NOMANGLE
14 ## --disassemble-functions with --demangle.
15 # RUN: llvm-objdump -C --disassemble-functions='foo()' %t.o | FileCheck %s --check-prefix=DEMANGLED
16 # RUN: llvm-objdump -C --disassemble-functions='_Z3foov' %t.o 2>&1 \
17 # RUN: | FileCheck %s --check-prefix=DEMANGLED-MISS
18 # RUN: llvm-objdump -C --disassemble-functions='i,f' %t.o | FileCheck %s --check-prefix=NOMANGLE
19 # RUN: llvm-objdump -C --disassemble-functions='std::allocator<wchar_t>::allocator()' %t.o 2>&1 \
20 # RUN: | FileCheck %s --check-prefix=DEMANGLED-MULTI
23 # MANGLED-MISS: warning: failed to disassemble missing function foo
26 # DEMANGLED-MISS: warning: failed to disassemble missing function _Z3foov
31 # DEMANGLED-MULTI: std::allocator<wchar_t>::allocator():
32 # DEMANGLED-MULTI: std::allocator<wchar_t>::allocator():
43 Flags: [SHF_ALLOC, SHF_EXECINSTR]