Introduce DILocation.
llvm-svn: 80648
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index 0be6fcf..d09704f 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/lib/Analysis/DebugInfo.cpp
@@ -791,6 +791,18 @@
return DILexicalBlock(MDNode::get(VMContext, &Elts[0], 2));
}
+/// CreateLocation - Creates a debug info location.
+DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo,
+ DIScope S, DILocation OrigLoc) {
+ Value *Elts[] = {
+ ConstantInt::get(Type::getInt32Ty(VMContext), LineNo),
+ ConstantInt::get(Type::getInt32Ty(VMContext), ColumnNo),
+ S.getNode(),
+ OrigLoc.getNode(),
+ };
+ return DILocation(MDNode::get(VMContext, &Elts[0], 4));
+}
+
//===----------------------------------------------------------------------===//
// DIFactory: Routines for inserting code into a function