diff options
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index e2da3998c8..ce43d4f38a 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -941,6 +941,7 @@ void CGDebugInfo::EmitFunctionStart(const char *Name, QualType FnType, // Push function on region stack. RegionStack.push_back(SP); + EmitStopPoint(Fn, Builder); } @@ -1165,7 +1166,9 @@ void CGDebugInfo::EmitDeclare(const VarDecl *Decl, unsigned Tag, DebugFactory.CreateVariable(Tag, RegionStack.back(),Decl->getNameAsString(), Unit, Line, Ty); // Insert an llvm.dbg.declare into the current block. - DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); + llvm::Instruction *Call = + DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); + Builder.SetDebugLocation(Call); } /// EmitDeclare - Emit local variable declaration debug info. |