diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-01 01:14:15 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-01 01:14:15 +0000 |
commit | 8a6a4f5d031875716e06bf7339708874e97d915b (patch) | |
tree | 425477c2ba2da28e891b070c02987ea8da723745 /lib/Analysis | |
parent | d4794f1da6e32d0eda205da2f994a25d1632aea9 (diff) | |
download | external_llvm-8a6a4f5d031875716e06bf7339708874e97d915b.zip external_llvm-8a6a4f5d031875716e06bf7339708874e97d915b.tar.gz external_llvm-8a6a4f5d031875716e06bf7339708874e97d915b.tar.bz2 |
Introduce DILocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 0be6fcf..d09704f 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -791,6 +791,18 @@ DILexicalBlock DIFactory::CreateLexicalBlock(DIDescriptor Context) { 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 |