diff options
author | Devang Patel <dpatel@apple.com> | 2009-11-10 23:07:24 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-11-10 23:07:24 +0000 |
commit | af993bf5cc33c79d981502ccc4d98bdddc46a648 (patch) | |
tree | f465d12b083e9f0d6fe572fcdc68228b5754f29f /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | f6eeaebd768e0d6d9f7999884f131ae83db86c4f (diff) | |
download | bcm5719-llvm-af993bf5cc33c79d981502ccc4d98bdddc46a648.tar.gz bcm5719-llvm-af993bf5cc33c79d981502ccc4d98bdddc46a648.zip |
Attach location info with llvm.dbg.declare.
llvm-svn: 86750
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index e2da3998c80..ce43d4f38a6 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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. |