diff options
author | Pavel Labath <labath@google.com> | 2018-06-12 16:50:01 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-06-12 16:50:01 +0000 |
commit | 0e33a0cd58ac7e7764943b5b478ea6812d890476 (patch) | |
tree | 24befdec88016242d1756c6335a4b5186f8b9723 /lldb/packages/Python | |
parent | f72cdb50bef481d0a2057c9e55b3612a6c05b839 (diff) | |
download | bcm5719-llvm-0e33a0cd58ac7e7764943b5b478ea6812d890476.tar.gz bcm5719-llvm-0e33a0cd58ac7e7764943b5b478ea6812d890476.zip |
DebugNamesDWARFIndex: Implement DWARFDeclContext variant of GetTypes method
This method is used to find complete definitions of a type when one
parses a compile unit with only forward declaration available.
Since it is only accessed from DWARFASTParserClang, it was not
possible/easy to trigger this codepath from lldb-test. Therefore, I
adapt add a debug-names variant to an existing dotest test to cover this
scenario.
llvm-svn: 334516
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py b/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py index c118ca95a0e..2537beb87df 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py @@ -7,6 +7,7 @@ import os import time import lldb from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * import lldbsuite.test.lldbutil as lldbutil @@ -14,9 +15,9 @@ class ForwardDeclarationTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - def test_and_run_command(self): + def do_test(self, dictionary=None): """Display *bar_ptr when stopped on a function with forward declaration of struct bar.""" - self.build() + self.build(dictionary=dictionary) exe = self.getBuildArtifact("a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -53,3 +54,15 @@ class ForwardDeclarationTestCase(TestBase): '(bar)', '(int) a = 1', '(int) b = 2']) + + def test(self): + self.do_test() + + @no_debug_info_test + @skipIfDarwin + @skipIf(compiler=no_match("clang")) + @skipIf(compiler_version=["<", "7.0"]) + def test_debug_names(self): + """Test that we are able to find complete types when using DWARF v5 + accelerator tables""" + self.do_test(dict(CFLAGS_EXTRAS="-mllvm -accel-tables=Dwarf")) |