[llvm-commits] [llvm-gcc-4.2] r100094 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Chris Lattner
sabre at nondot.org
Wed Mar 31 23:31:44 PDT 2010
Author: lattner
Date: Thu Apr 1 01:31:44 2010
New Revision: 100094
URL: http://llvm.org/viewvc/llvm-project?rev=100094&view=rev
Log:
adjust to IRBuilder change and use faster DebugLoc apis.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=100094&r1=100093&r2=100094&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Thu Apr 1 01:31:44 2010
@@ -470,12 +470,8 @@
// Insert an llvm.dbg.declare into the current block.
Instruction *Call = DebugFactory.InsertDeclare(AI, D,
Builder.GetInsertBlock());
-
- llvm::DILocation DO(NULL);
- llvm::DILocation DL =
- DebugFactory.CreateLocation(CurLineNo, 0 /* column */, VarScope, DO);
- Call->setDbgMetadata(DL.getNode());
+ Call->setDebugLoc(NewDebugLoc::get(CurLineNo, 0, VarScope.getNode()));
}
@@ -524,12 +520,8 @@
if (RegionStack.empty())
return;
- llvm::DIDescriptor DR(cast<MDNode>(RegionStack.back()));
- llvm::DIScope DS = llvm::DIScope(DR.getNode());
- llvm::DILocation DO(NULL);
- llvm::DILocation DL =
- DebugFactory.CreateLocation(CurLineNo, 0 /* column */, DS, DO);
- Builder.SetCurrentDebugLocation(DL.getNode());
+ MDNode *Scope = cast<MDNode>(RegionStack.back());
+ Builder.SetCurrentDebugLocation(NewDebugLoc::get(CurLineNo,0/*col*/,Scope));
}
}
More information about the llvm-commits
mailing list