diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-11-09 19:17:56 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-11-09 19:17:56 +0000 |
commit | a40cce80a7d205653a16544ed53923da3631e90a (patch) | |
tree | b1ac26d14433bb4a85cd46b4a81af3a2b0a526ea /clang/lib/CodeGen/CodeGenFunction.h | |
parent | e32d1297124fc1d7b3aeec8530f77e1babe8fb93 (diff) | |
download | llvm-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.h | 2 |
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 |