blob: 84e3b62e17bbc6292c527568ae962bb1f708e5d3 [file] [log] [blame]
Pavel Labath452bd872018-06-07 10:35:28 +00001// Test that we return complete results when only a part of the binary is built
2// with an index.
3
4// REQUIRES: lld
5
Zachary Turner58db03a2018-11-19 15:12:34 +00006// RUN: %clang %s -g -c -o %t-1.o --target=x86_64-pc-linux -DONE -mllvm -accel-tables=Dwarf
7// RUN: %clang %s -g -c -o %t-2.o --target=x86_64-pc-linux -DTWO -mllvm -accel-tables=Dwarf
Pavel Labath452bd872018-06-07 10:35:28 +00008// RUN: ld.lld %t-1.o %t-2.o -o %t
9// RUN: lldb-test symbols --find=variable --name=foo %t | FileCheck %s
10
11// CHECK: Found 2 variables:
12#ifdef ONE
13namespace one {
14int foo;
15// CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]
16} // namespace one
17extern "C" void _start() {}
18#else
19namespace two {
20int foo;
21// CHECK-DAG: name = "foo", {{.*}} decl = dwarf5-partial-index.cpp:[[@LINE-1]]
22} // namespace two
23#endif