summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-25 03:34:56 +0000
committerChris Lattner <sabre@nondot.org>2010-01-25 03:34:56 +0000
commit83b0dd16c38975a04b95018ee74bbcdb4f21c27b (patch)
treee4c0d72ad353ebd7aff3793f600023de89fe3401 /clang/lib/CodeGen
parentbf78478d35b51cc924afd74f650ac8ba99f2ba78 (diff)
downloadbcm5719-llvm-83b0dd16c38975a04b95018ee74bbcdb4f21c27b.tar.gz
bcm5719-llvm-83b0dd16c38975a04b95018ee74bbcdb4f21c27b.zip
fix rdar://7556129 a crash in blocks debug info codegen.
llvm-svn: 94402
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index a5d990a4ed7..5768e5b4db5 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1517,12 +1517,13 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag,
// Create the descriptor for the variable.
llvm::DIVariable D =
- DebugFactory.CreateComplexVariable(Tag, llvm::DIDescriptor(RegionStack.back()),
+ DebugFactory.CreateComplexVariable(Tag,
+ llvm::DIDescriptor(RegionStack.back()),
Decl->getName(), Unit, Line, Ty,
addr);
// Insert an llvm.dbg.declare into the current block.
llvm::Instruction *Call =
- DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertPoint());
+ DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock());
llvm::DIScope DS(RegionStack.back());
llvm::DILocation DO(NULL);
OpenPOWER on IntegriCloud