summaryrefslogtreecommitdiffstats
path: root/lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-05-21 09:27:16 +0000
committerPavel Labath <labath@google.com>2018-05-21 09:27:16 +0000
commitbf5a3f839341a5162482f8e9f389c320087b89eb (patch)
tree4f03dc47b4f80e01f0004473996cfcebfb405c07 /lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp
parent092d42557b6c70d32b0b9362e4a8db9566369ddc (diff)
downloadbcm5719-llvm-bf5a3f839341a5162482f8e9f389c320087b89eb.tar.gz
bcm5719-llvm-bf5a3f839341a5162482f8e9f389c320087b89eb.zip
Add some apple-tables lookup tests
Summary: Now that we are able to parse MachO files everywhere, we can write some cross-platform tests for handling of apple accelerator tables. This reruns the same lookup tests we have for manual indexes on MachO files which will use the accelerator tables instead. This makes sure we return the same results regardless of the method we used to access the debug info. The tests confirm we return the same results for looking up types, namespaces and variables, but have found an inconsistency in the treatment of function lookup. In the function case we mis-classify the method "foo" declared in the local struct sbar (inside function ffbar). We classify it as a function whereas it really is a method. Preliminary analysis suggests this is because DWARFASTParserClang::GetClangDeclContextForDIE returns null when given the local "struct sbar" DIE. This causes us to get the wrong CompilerDeclContext when we ask for the context of the inner foo, which means CompilerDeclContext::ISStructUnionOrClass returns false. Until this is fixed, I do not include the darwin versions of the "base" and "method" function lookup tests. Reviewers: JDevlieghere, clayborg Subscribers: aprantl, ilya-biryukov, ioeric, lldb-commits Differential Revision: https://reviews.llvm.org/D47064 llvm-svn: 332831
Diffstat (limited to 'lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp')
-rw-r--r--lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp b/lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp
index 393cc7eab76..92485dddd48 100644
--- a/lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp
+++ b/lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp
@@ -8,6 +8,14 @@
// RUN: FileCheck --check-prefix=CONTEXT %s
// RUN: lldb-test symbols --name=not_there --find=namespace %t | \
// RUN: FileCheck --check-prefix=EMPTY %s
+//
+// RUN: clang %s -g -c -o %t --target=x86_64-apple-macosx
+// RUN: lldb-test symbols --name=foo --find=namespace %t | \
+// RUN: FileCheck --check-prefix=FOO %s
+// RUN: lldb-test symbols --name=foo --find=namespace --context=context %t | \
+// RUN: FileCheck --check-prefix=CONTEXT %s
+// RUN: lldb-test symbols --name=not_there --find=namespace %t | \
+// RUN: FileCheck --check-prefix=EMPTY %s
// FOO: Found namespace: foo
OpenPOWER on IntegriCloud