diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 19:22:02 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 19:22:02 +0000 |
commit | 87aa9c9e4d41ed881453e2fab85b3d25f648bb55 (patch) | |
tree | 63efe79832bf3de4f63e4e81c62e73923947b882 /lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp | |
parent | fd18e94697c987d5f24e25aa4e27adaffff3cce4 (diff) | |
download | bcm5719-llvm-87aa9c9e4d41ed881453e2fab85b3d25f648bb55.tar.gz bcm5719-llvm-87aa9c9e4d41ed881453e2fab85b3d25f648bb55.zip |
Re-land "[test] Split LLDB tests into API, Shell & Unit"
The original patch got reverted because it broke `check-lldb` on a clean
build. This fixes that.
llvm-svn: 374201
Diffstat (limited to 'lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp')
-rw-r--r-- | lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp new file mode 100644 index 00000000000..550896cc707 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp @@ -0,0 +1,38 @@ +// 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 the same test with split-dwarf. This is interesting because the two +// split compile units will have the same offset (0). +// RUN: %clang -g -c -o %t-1.o --target=x86_64-pc-linux -gsplit-dwarf %s +// RUN: %clang -g -c -o %t-2.o --target=x86_64-pc-linux -gsplit-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 + +// 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 |