Fix debuginfo-tests with GDB on Linux
authorReid Kleckner <rnk@google.com>
Thu, 31 Aug 2017 18:16:55 +0000 (18:16 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 31 Aug 2017 18:16:55 +0000 (18:16 +0000)
commita6fc06babc7e0b057ee32b17eb350678038c3736
tree3fbb1ca08d6c03fce4fda221c8596ee67cb77012
parente200f9bae6d90773e260c8bfc5a81eef6441836f
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
debuginfo-tests/asan-blocks.c [new file with mode: 0644]
debuginfo-tests/asan.c
debuginfo-tests/dbg-arg.c
debuginfo-tests/safestack.c
debuginfo-tests/stack-var.c