aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-11-10 23:07:24 +0000
committerDevang Patel <dpatel@apple.com>2009-11-10 23:07:24 +0000
commita0203800ea2f93b2ce00fae24d6deac57617268d (patch)
tree85b04a23d7ba1777c52bac06376d8053f3e32084 /lib/CodeGen/CGDebugInfo.cpp
parent496e45ef3350fabc312c5a807d308c65c50af4db (diff)
Attach location info with llvm.dbg.declare.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp5
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.