diff options
Diffstat (limited to 'lit/SymbolFile/DWARF/find-variable-file.cpp')
| -rw-r--r-- | lit/SymbolFile/DWARF/find-variable-file.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lit/SymbolFile/DWARF/find-variable-file.cpp b/lit/SymbolFile/DWARF/find-variable-file.cpp new file mode 100644 index 000000000000..f71d4a2b09b6 --- /dev/null +++ b/lit/SymbolFile/DWARF/find-variable-file.cpp @@ -0,0 +1,28 @@ +// REQUIRES: lld + +// RUN: clang -g -c -o %t-1.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable %s +// RUN: clang -g -c -o %t-2.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable %S/Inputs/find-variable-file-2.cpp +// RUN: ld.lld %t-1.o %t-2.o -o %t +// RUN: lldb-test symbols --file=find-variable-file.cpp --find=variable %t | \ +// RUN: FileCheck --check-prefix=ONE %s +// RUN: lldb-test symbols --file=find-variable-file-2.cpp --find=variable %t | \ +// RUN: FileCheck --check-prefix=TWO %s + +// RUN: clang -g -c -o %t-1.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %s +// RUN: clang -g -c -o %t-2.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %S/Inputs/find-variable-file-2.cpp +// RUN: ld.lld %t-1.o %t-2.o -o %t +// RUN: lldb-test symbols --file=find-variable-file.cpp --find=variable %t | \ +// RUN: FileCheck --check-prefix=ONE %s +// RUN: lldb-test symbols --file=find-variable-file-2.cpp --find=variable %t | \ +// RUN: FileCheck --check-prefix=TWO %s + +// ONE: Found 1 variables: +namespace one { +int foo; +// ONE-DAG: name = "foo", type = {{.*}} (int), {{.*}} decl = find-variable-file.cpp:[[@LINE-1]] +} // namespace one + +extern "C" void _start() {} + +// TWO: Found 1 variables: +// TWO-DAG: name = "foo", {{.*}} decl = find-variable-file-2.cpp:2 |
