summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/debug-info-vla.c
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2018-11-09 19:17:56 +0000
committerAdrian Prantl <aprantl@apple.com>2018-11-09 19:17:56 +0000
commita40cce80a7d205653a16544ed53923da3631e90a (patch)
treeb1ac26d14433bb4a85cd46b4a81af3a2b0a526ea /clang/test/CodeGen/debug-info-vla.c
parente32d1297124fc1d7b3aeec8530f77e1babe8fb93 (diff)
downloadbcm5719-llvm-a40cce80a7d205653a16544ed53923da3631e90a.tar.gz
bcm5719-llvm-a40cce80a7d205653a16544ed53923da3631e90a.zip
Fix a nondeterminism in the debug info for VLA size expressions.
The artificial variable describing the array size is supposed to be called "__vla_expr", but this was implemented by retrieving the name of the associated alloca, which isn't a reliable source for the name, since nonassert compilers may drop names from LLVM IR. rdar://problem/45924808 llvm-svn: 346542
Diffstat (limited to 'clang/test/CodeGen/debug-info-vla.c')
-rw-r--r--clang/test/CodeGen/debug-info-vla.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGen/debug-info-vla.c b/clang/test/CodeGen/debug-info-vla.c
index 8bd6a6d0acb..22b3930dfc8 100644
--- a/clang/test/CodeGen/debug-info-vla.c
+++ b/clang/test/CodeGen/debug-info-vla.c
@@ -2,9 +2,9 @@
void testVLAwithSize(int s)
{
-// CHECK-DAG: dbg.declare({{.*}} %__vla_expr, metadata ![[VLAEXPR:[0-9]+]]
+// CHECK-DAG: dbg.declare({{.*}} %__vla_expr0, metadata ![[VLAEXPR:[0-9]+]]
// CHECK-DAG: dbg.declare({{.*}} %vla, metadata ![[VAR:[0-9]+]]
-// CHECK-DAG: ![[VLAEXPR]] = !DILocalVariable(name: "__vla_expr", {{.*}} flags: DIFlagArtificial
+// CHECK-DAG: ![[VLAEXPR]] = !DILocalVariable(name: "__vla_expr0", {{.*}} flags: DIFlagArtificial
// CHECK-DAG: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+2]]
// CHECK-DAG: !DISubrange(count: ![[VLAEXPR]])
int vla[s];
OpenPOWER on IntegriCloud