summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-11-23 19:11:20 +0000
committerDevang Patel <dpatel@apple.com>2009-11-23 19:11:20 +0000
commit75e6a40d6d18c9694ace40b97b41102c78d966fd (patch)
tree9b831a17ba17f7422a0f391188e58b1b9650913c /llvm/lib/Analysis/DebugInfo.cpp
parentb43737387b00a2f259d96a242fe8c1685566cd6c (diff)
downloadbcm5719-llvm-75e6a40d6d18c9694ace40b97b41102c78d966fd.tar.gz
bcm5719-llvm-75e6a40d6d18c9694ace40b97b41102c78d966fd.zip
Add CreateLocation varinat that accepts MDNode (with a default value).
llvm-svn: 89689
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index 8f62245296f..1a079b950a1 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/lib/Analysis/DebugInfo.cpp
@@ -976,6 +976,17 @@ DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo,
return DILocation(MDNode::get(VMContext, &Elts[0], 4));
}
+/// CreateLocation - Creates a debug info location.
+DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo,
+ DIScope S, MDNode *OrigLoc) {
+ Value *Elts[] = {
+ ConstantInt::get(Type::getInt32Ty(VMContext), LineNo),
+ ConstantInt::get(Type::getInt32Ty(VMContext), ColumnNo),
+ S.getNode(),
+ OrigLoc
+ };
+ return DILocation(MDNode::get(VMContext, &Elts[0], 4));
+}
//===----------------------------------------------------------------------===//
// DIFactory: Routines for inserting code into a function
OpenPOWER on IntegriCloud