From 5ba3215fe33aaac8d1065a78b1b1f29aa23721ac Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Mon, 23 May 2016 18:30:59 +0000 Subject: Removed the m_decl_objects map from ClangASTContext. m_decl_objects is problematic because it assumes that each VarDecl has a unique variable associated with it. This is not the case in inline contexts. Also the information in this map can be reconstructed very easily without maintaining the map. The rest of the testsuite passes with this cange, and I've added a testcase covering the inline contexts affected by this. llvm-svn: 270474 --- .../test/lang/c/inlines/TestRedefinitionsInInlines.py | 4 ++++ .../Python/lldbsuite/test/lang/c/inlines/main.c | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py create mode 100644 lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c (limited to 'lldb/packages/Python/lldbsuite/test/lang/c') diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py b/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py new file mode 100644 index 00000000000..f08c0dcbda9 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals(), []) diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c b/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c new file mode 100644 index 00000000000..1bf4cdafdaa --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c @@ -0,0 +1,19 @@ +#include + +void test1(int) __attribute__ ((always_inline)); +void test2(int) __attribute__ ((always_inline)); + +void test2(int b) { + printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]) +} + +void test1(int a) { + printf("test1(%d)\n", a); + test2(a+1);//% self.dbg.HandleCommand("step") + //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["24"]) +} + +int main() { + test2(42); + test1(23); +} -- cgit v1.2.3