]> granicus.if.org Git - clang/commitdiff
Emit intrinsic at current insert point, not at the end of current block.
authorDevang Patel <dpatel@apple.com>
Mon, 25 Apr 2011 23:52:27 +0000 (23:52 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 25 Apr 2011 23:52:27 +0000 (23:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130177 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index a90237cb3234096db30c34582fb6e4d6b9b66894..29f9b9e8aa0dd6f813d70412a9354a64d505c63c 100644 (file)
@@ -2027,7 +2027,7 @@ void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(
                                    VD->getName(), Unit, Line, Ty, addr);
   // Insert an llvm.dbg.declare into the current block.
   llvm::Instruction *Call = 
-    DBuilder.insertDeclare(Storage, D, Builder.GetInsertBlock());
+    DBuilder.insertDeclare(Storage, D, Builder.GetInsertPoint());
   
   llvm::MDNode *Scope = RegionStack.back();
   Call->setDebugLoc(llvm::DebugLoc::get(Line, Column, Scope));