From 3256c751f50682f0d06b76736f756c25dd45f4a5 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 30 Sep 2009 22:51:28 +0000 Subject: Use MDNode * directly as an RecordSourceLine() argument. llvm-svn: 83182 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 8a74a8ee441..549644a37da 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1731,8 +1731,7 @@ void DwarfDebug::BeginFunction(MachineFunction *MF) { DebugLoc FDL = MF->getDefaultDebugLoc(); if (!FDL.isUnknown()) { DebugLocTuple DLT = MF->getDebugLocTuple(FDL); - unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col, - DICompileUnit(DLT.CompileUnit)); + unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col, DLT.CompileUnit); Asm->printLabel(LabelID); O << '\n'; } @@ -1825,14 +1824,15 @@ unsigned DwarfDebug::RecordSourceLine(Value *V, unsigned Line, unsigned Col) { /// RecordSourceLine - Records location information and associates it with a /// label. Returns a unique label ID used to generate a label and provide /// correspondence to the source line list. -unsigned DwarfDebug::RecordSourceLine(unsigned Line, unsigned Col, - DICompileUnit CU) { +unsigned DwarfDebug::RecordSourceLine(unsigned Line, unsigned Col, + MDNode *Scope) { if (!MMI) return 0; if (TimePassesIsEnabled) DebugTimer->startTimer(); + DICompileUnit CU(Scope); unsigned Src = GetOrCreateSourceID(CU.getDirectory(), CU.getFilename()); unsigned ID = MMI->NextLabelID(); -- cgit v1.2.3