aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
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/lib/CodeGen/CodeGenFunction.h
parente32d1297124fc1d7b3aeec8530f77e1babe8fb93 (diff)
downloadllvm-a40cce80a7d205653a16544ed53923da3631e90a.zip
llvm-a40cce80a7d205653a16544ed53923da3631e90a.tar.gz
llvm-a40cce80a7d205653a16544ed53923da3631e90a.tar.bz2
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/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index f6b7629..9f09119 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -1197,6 +1197,8 @@ public:
private:
CGDebugInfo *DebugInfo;
+ /// Used to create unique names for artificial VLA size debug info variables.
+ unsigned VLAExprCounter = 0;
bool DisableDebugInfo = false;
/// DidCallStackSave - Whether llvm.stacksave has been called. Used to avoid