[llvm-commits] [llvm-gcc-4.2] r48642 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Fri Mar 21 02:24:44 PDT 2008
Author: baldrick
Date: Fri Mar 21 04:24:44 2008
New Revision: 48642
URL: http://llvm.org/viewvc/llvm-project?rev=48642&view=rev
Log:
Do not generate debug info for compiler generated
temporaries. Based on a patch by Jay Foad. This
fixes PR2167.
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=48642&r1=48641&r2=48642&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Fri Mar 21 04:24:44 2008
@@ -315,18 +315,22 @@
/// region - "llvm.dbg.declare."
void DebugInfo::EmitDeclare(tree decl, unsigned Tag, const char *Name,
tree type, Value *AI, BasicBlock *CurBB) {
+ // Ignore compiler generated temporaries.
+ if (DECL_IGNORED_P(decl))
+ return;
+
// Lazily construct llvm.dbg.declare function.
const PointerType *EmpPtr = SR.getEmptyStructPtrType();
if (!DeclareFn)
DeclareFn = Intrinsic::getDeclaration(M, Intrinsic::dbg_declare);
-
+
// Get type information.
CompileUnitDesc *Unit = getOrCreateCompileUnit(CurFullPath);
TypeDesc *TyDesc = getOrCreateType(type, Unit);
expanded_location Loc = GetNodeLocation(decl, false);
CompileUnitDesc *File = Loc.line ? getOrCreateCompileUnit(Loc.file) : NULL;
-
+
// Construct variable.
VariableDesc *Variable = new VariableDesc(Tag);
Variable->setContext(RegionStack.back());
More information about the llvm-commits
mailing list