diff options
| author | Reid Kleckner <rnk@google.com> | 2017-08-31 18:16:55 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-08-31 18:16:55 +0000 |
| commit | a6fc06babc7e0b057ee32b17eb350678038c3736 (patch) | |
| tree | 3fbb1ca08d6c03fce4fda221c8596ee67cb77012 /debuginfo-tests/stack-var.c | |
| parent | e200f9bae6d90773e260c8bfc5a81eef6441836f (diff) | |
| download | bcm5719-llvm-a6fc06babc7e0b057ee32b17eb350678038c3736.tar.gz bcm5719-llvm-a6fc06babc7e0b057ee32b17eb350678038c3736.zip | |
Fix debuginfo-tests with GDB on Linux
Summary:
Split asan.c into asan.c and asan-blocks.c, which will be
darwin-specific. I suspect we could make it pass on Linux by adding
cmake to build BlocksRuntime from compiler-rt, but I'm not shaving that
yak yet.
asan.c and safestack.c: GDB and LLDB appear to print aggregates
differently today. Print individual elements instead of the entire
aggregate.
dbg-arg.c: GDB doesn't appear to print leading zeros when printing
pointers.
stack-var.c: Add the optnone attribute so that LLVM won't optimize away
this no-op function call. This should be a cross-platform failure
observable on Mac, so this is surprising.
Reviewers: aprantl, dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D37344
llvm-svn: 312265
Diffstat (limited to 'debuginfo-tests/stack-var.c')
| -rw-r--r-- | debuginfo-tests/stack-var.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/debuginfo-tests/stack-var.c b/debuginfo-tests/stack-var.c index 8569546e184..372139c59b0 100644 --- a/debuginfo-tests/stack-var.c +++ b/debuginfo-tests/stack-var.c @@ -1,18 +1,18 @@ // RUN: %clang %target_itanium_abi_host_triple %s -O -o %t.out -g // RUN: %test_debuginfo %s %t.out -void __attribute__((noinline)) bar(int *test) {} +void __attribute__((noinline, optnone)) bar(int *test) {} int main() { int test; test = 23; // DEBUGGER: break 12 // DEBUGGER: r // DEBUGGER: p test - // CHECK: 23 + // CHECK: = 23 bar(&test); // DEBUGGER: break 17 // DEBUGGER: c // DEBUGGER: p test - // CHECK: 23 + // CHECK: = 23 return test; } |

