diff options
author | Sean Callanan <scallanan@apple.com> | 2016-05-23 18:30:59 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2016-05-23 18:30:59 +0000 |
commit | 5ba3215fe33aaac8d1065a78b1b1f29aa23721ac (patch) | |
tree | 518cd521cbf9c02659258bd2c0278f71d419a4c5 /lldb/packages/Python/lldbsuite/test/lang/c | |
parent | 86d5f8ad4cdd93a04b413cc649da247869666f88 (diff) | |
download | bcm5719-llvm-5ba3215fe33aaac8d1065a78b1b1f29aa23721ac.tar.gz bcm5719-llvm-5ba3215fe33aaac8d1065a78b1b1f29aa23721ac.zip |
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.
<rdar://problem/26278502>
llvm-svn: 270474
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py | 4 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c | 19 |
2 files changed, 23 insertions, 0 deletions
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 <stdio.h> + +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); +} |