/// EmitInlineAsm - Emit a blob of inline asm to the output streamer.
void EmitInlineAsm(StringRef Str) const;
- /// processDebugLoc - Processes the debug information of each machine
- /// instruction's DebugLoc.
- void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn);
-
- /// EmitInlineAsm - This method formats and emits the specified machine
+ /// EmitInlineAsm - This method formats and emits the specified machine
/// instruction that is an inline asm.
void EmitInlineAsm(const MachineInstr *MI) const;
// Emit target-specific gunk before the function body.
EmitFunctionBodyStart();
+ bool ShouldPrintDebugScopes =
+ DW && MAI->doesSupportDebugInformation() &&DW->ShouldEmitDwarfDebug();
+
// Print out code for the function.
bool HasAnyRealCode = false;
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
++EmittedInsts;
- // FIXME: Clean up processDebugLoc.
- processDebugLoc(II, true);
+ if (ShouldPrintDebugScopes)
+ DW->BeginScope(II);
if (VerboseAsm)
EmitComments(*II, OutStreamer.GetCommentOS());
break;
}
- // FIXME: Clean up processDebugLoc.
- processDebugLoc(II, false);
+ if (ShouldPrintDebugScopes)
+ DW->EndScope(II);
}
}
}
}
-/// processDebugLoc - Processes the debug information of each machine
-/// instruction's DebugLoc.
-void AsmPrinter::processDebugLoc(const MachineInstr *MI,
- bool BeforePrintingInsn) {
- if (!DW || !MAI->doesSupportDebugInformation() || !DW->ShouldEmitDwarfDebug())
- return;
-
- if (!BeforePrintingInsn)
- // After printing instruction
- DW->EndScope(MI);
- else
- DW->BeginScope(MI);
-}
-
-
/// EmitInlineAsm - This method formats and emits the specified machine
/// instruction that is an inline asm.
void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {