DwarfDebug::DwarfDebug(AsmPrinter *A)
: Asm(A), MMI(Asm->MMI), ModuleCU(0),
- AbbreviationsSet(InitAbbreviationsSetSize), shouldEmit(false),
+ AbbreviationsSet(InitAbbreviationsSetSize),
CurrentFnDbgScope(0), DebugTimer(0) {
NextStringPoolNumber = 0;
if (!HasDebugInfo) return;
- shouldEmit = true;
-
// Tell MMI that we have debug info.
MMI->setDebugInfoAvailability(true);
/// beginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point.
void DwarfDebug::beginFunction(const MachineFunction *MF) {
- if (!ShouldEmitDwarfDebug()) return;
+ if (!MMI->hasDebugInfo()) return;
TimeRegion Timer(DebugTimer);
if (!extractScopeInformation())
/// endFunction - Gather and emit post-function debug information.
///
void DwarfDebug::endFunction(const MachineFunction *MF) {
- if (!ShouldEmitDwarfDebug()) return;
+ if (!MMI->hasDebugInfo()) return;
if (DbgScopeMap.empty()) return;
TimeRegion Timer(DebugTimer);
///
std::vector<std::vector<SrcLineInfo> > SectionSourceLines;
- /// shouldEmit - Flag to indicate if debug information should be emitted.
- ///
- bool shouldEmit;
-
// CurrentFnDbgScope - Top level scope for the current function.
//
DbgScope *CurrentFnDbgScope;
DwarfDebug(AsmPrinter *A);
virtual ~DwarfDebug();
- /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
- /// be emitted.
- bool ShouldEmitDwarfDebug() const { return shouldEmit; }
-
/// beginModule - Emit all Dwarf sections that should come prior to the
/// content.
void beginModule(Module *M);