aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-cxxfilt/quote.test
blob: 15ced1f6935b890c7cbf8d75d18242d3c4d986bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Show that llvm-cxxfilt --quote adds quotes around demangled symbols, unless
// the symbol is already quoted.

RUN: split-file %s %t

RUN: llvm-cxxfilt --quote < %t/symbols-in-file.test | FileCheck --match-full-lines --check-prefix=CHECK-FILE %s
CHECK-FILE: "bar()" "bar()"
CHECK-FILE-NEXT: "bar()" "bar()"
CHECK-FILE: log()
CHECK-FILE: "import thunk for std::future<void>"

// Check it works with CLI symbols too. Since a quoted mangled name is not a
// mangled name, it should be unchanged.
RUN: llvm-cxxfilt --quote _Z3firv '"_Z3barv"' 'saw()' | FileCheck --match-full-lines --check-prefix=CHECK-CLI %s
CHECK-CLI: "fir()"
CHECK-CLI-NEXT: "_Z3barv"
CHECK-CLI-NEXT: saw()

//--- symbols-in-file.test
_Z3barv "_Z3barv"
"_Z3barv" _Z3barv
// This is not mangled, thus it should not be quoted.
log()
// Check that an "import thunk for" prefix can be quoted along the demangled
// name.
__imp__ZSt6futureIvE