diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-10-26 18:16:05 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-10-26 18:16:05 +0000 |
commit | 1c45b09add3b9a254af8b85c9cbc37f16fc34f92 (patch) | |
tree | b0792be31450825433ae8c82590f8c53512aa34f /clang/lib/CodeGen/CGDebugInfo.h | |
parent | 9b4e32785ab10c28240634aa0a2a2f5100704d6f (diff) | |
download | bcm5719-llvm-1c45b09add3b9a254af8b85c9cbc37f16fc34f92.tar.gz bcm5719-llvm-1c45b09add3b9a254af8b85c9cbc37f16fc34f92.zip |
Simplify codegen and debug info generation for block context parameters.
The exisiting code goes out of its way to put block parameters into an
alloca only at -O0, and then describes the funciton argument with a
dbg.declare, which is undocumented in the LLVM-CFE contract and does
not actually behave as intended after LLVM r642022.
This patch just generates the alloca unconditionally, the mem2reg pass
will eliminate it at -O1 and up anyway and points the dbg.declare to
the alloca as intended (which mem2reg will then correctly rewrite into
a dbg.value).
rdar://problem/35043980
Differential Revision: https://reviews.llvm.org/D39305
llvm-svn: 316684
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.h')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 36de231f05f..4f7b7f2a0d9 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -398,8 +398,8 @@ public: /// Emit call to \c llvm.dbg.declare for the block-literal argument /// to a block invocation function. void EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block, - llvm::Value *Arg, unsigned ArgNo, - llvm::Value *LocalAddr, + StringRef Name, unsigned ArgNo, + llvm::AllocaInst *LocalAddr, CGBuilderTy &Builder); /// Emit information about a global variable. |