diff options
author | 2020-08-03 14:33:06 +0000 | |
---|---|---|
committer | 2020-08-03 14:33:06 +0000 | |
commit | 061da546b983eb767bad15e67af1174fb0bcf31c (patch) | |
tree | 83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines | |
parent | Import LLVM 10.0.0 release including clang, lld and lldb. (diff) | |
download | wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip |
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom
tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines')
-rw-r--r-- | gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py | 9 | ||||
-rw-r--r-- | gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c | 25 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py new file mode 100644 index 00000000000..311c5ec8e12 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py @@ -0,0 +1,9 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, + globals(), + [decorators.expectedFailureAll(compiler="clang", + compiler_version=["<", + "3.5"], + bugnumber="llvm.org/pr27845")]) diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c new file mode 100644 index 00000000000..8fe49180800 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c @@ -0,0 +1,25 @@ +#include <stdio.h> + +inline void test1(int) __attribute__ ((always_inline)); +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"]) + { + int c = b * 2; + printf("c=%d\n", c); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]) + //% self.expect("expression c", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["84"]) + } +} + +void test1(int a) { + printf("test1(%d)\n", a); + test2(a+1);//% self.runCmd("step") + //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["24"]) +} + +int main() { + test2(42); + test1(23); + return 0; +} |