public:
- /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
+ /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+ /// be emitted.
///
- bool ShouldEmitDwarf() const { return shouldEmit; }
+ bool ShouldEmitDwarfDebug() const { return shouldEmit; }
/// AssignAbbrevNumber - Define a unique number for the abbreviation.
///
/// EndModule - Emit all Dwarf sections that should come after the content.
///
void EndModule() {
- if (!ShouldEmitDwarf()) return;
+ if (!ShouldEmitDwarfDebug()) return;
// Standard sections final addresses.
Asm->SwitchToSection(TAI->getTextSection());
void BeginFunction(MachineFunction *MF) {
this->MF = MF;
- if (!ShouldEmitDwarf()) return;
+ if (!ShouldEmitDwarfDebug()) return;
// Begin accumulating function debug information.
MMI->BeginFunction(MF);
/// EndFunction - Gather and emit post-function debug information.
///
void EndFunction(MachineFunction *MF) {
- if (!ShouldEmitDwarf()) return;
+ if (!ShouldEmitDwarfDebug()) return;
// Define end label for subprogram.
EmitLabel("func_end", SubprogramCount);
DD->RecordVariable(GV, FrameIndex);
}
+/// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+/// be emitted.
+bool DwarfWriter::ShouldEmitDwarfDebug() const {
+ return DD->ShouldEmitDwarfDebug();
+}
}
O << "\";\n\n";
- O << " if (TAI->doesSupportDebugInformation()) {\n"
+ O << " if (TAI->doesSupportDebugInformation() &&\n"
+ << " DW->ShouldEmitDwarfDebug()) {\n"
<< " const MachineFunction *MF = MI->getParent()->getParent();\n"
<< " DebugLoc CurDL = MI->getDebugLoc();\n\n"
<< " if (!CurDL.isUnknown()) {\n"