[llvm-commits] [dragonegg] r88788 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Sat Nov 14 04:41:17 PST 2009
Author: baldrick
Date: Sat Nov 14 06:41:17 2009
New Revision: 88788
URL: http://llvm.org/viewvc/llvm-project?rev=88788&view=rev
Log:
Port commit 87008 (dpatel) from llvm-gcc:
"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types.
Modified:
dragonegg/trunk/llvm-debug.cpp
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=88788&r1=88787&r2=88788&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat Nov 14 06:41:17 2009
@@ -243,9 +243,6 @@
Fn->hasInternalLinkage(),
true /*definition*/);
-#ifndef ATTACH_DEBUG_INFO_TO_AN_INSN
- DebugFactory.InsertSubprogramStart(SP, CurBB);
-#endif
// Push function on region stack.
RegionStack.push_back(SP);
RegionMap[FnDecl] = SP;
@@ -286,9 +283,6 @@
/// region - "llvm.dbg.region.end."
void DebugInfo::EmitFunctionEnd(BasicBlock *CurBB, bool EndFunction) {
assert(!RegionStack.empty() && "Region stack mismatch, stack empty!");
-#ifndef ATTACH_DEBUG_INFO_TO_AN_INSN
- DebugFactory.InsertRegionEnd(RegionStack.back(), CurBB);
-#endif
RegionStack.pop_back();
// Blocks get erased; clearing these is needed for determinism, and also
// a good idea if the next function gets inlined.
@@ -327,14 +321,12 @@
Instruction *Call = DebugFactory.InsertDeclare(AI, D,
Builder.GetInsertBlock());
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- llvm::DIDescriptor DR = RegionStack.back();
- llvm::DIScope DS = llvm::DIScope(DR.getNode());
- llvm::DILocation DO(NULL);
- llvm::DILocation DL =
- DebugFactory.CreateLocation(CurLineNo, 0 /* column */, DS, DO);
- Builder.SetDebugLocation(Call, DL.getNode());
-#endif
+ llvm::DIDescriptor DR = RegionStack.back();
+ llvm::DIScope DS = llvm::DIScope(DR.getNode());
+ llvm::DILocation DO(NULL);
+ llvm::DILocation DL =
+ DebugFactory.CreateLocation(CurLineNo, 0 /* column */, DS, DO);
+ Builder.SetDebugLocation(Call, DL.getNode());
}
/// EmitStopPoint - Emit a call to llvm.dbg.stoppoint to indicate a change of
@@ -353,7 +345,6 @@
PrevLineNo = CurLineNo;
PrevBB = CurBB;
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
if (RegionStack.empty())
return;
llvm::DIDescriptor DR = RegionStack.back();
@@ -362,11 +353,6 @@
llvm::DILocation DL =
DebugFactory.CreateLocation(CurLineNo, 0 /* column */, DS, DO);
Builder.SetCurrentDebugLocation(DL.getNode());
-#else
- DebugFactory.InsertStopPoint(getOrCreateCompileUnit(CurFullPath),
- CurLineNo, 0 /*column no. */,
- CurBB);
-#endif
}
/// EmitGlobalVariable - Emit information about a global variable.
More information about the llvm-commits
mailing list