return Result;
}
-/// SetDebugInfo - Create global DIEs and emit initial debug info sections.
-/// This is inovked by the target AsmPrinter.
-void DwarfDebug::SetDebugInfo(MachineModuleInfo *mmi) {
+ /// BeginModule - Emit all Dwarf sections that should come prior to the
+ /// content. Create global DIEs and emit initial debug info sections.
+ /// This is inovked by the target AsmPrinter.
+void DwarfDebug::BeginModule(Module *M, MachineModuleInfo *mmi) {
+ this->M = M;
+
if (TimePassesIsEnabled)
DebugTimer->startTimer();
/// be emitted.
bool ShouldEmitDwarfDebug() const { return shouldEmit; }
- /// SetDebugInfo - Create global DIEs and emit initial debug info sections.
- /// This is inovked by the target AsmPrinter.
- void SetDebugInfo(MachineModuleInfo *mmi);
-
/// BeginModule - Emit all Dwarf sections that should come prior to the
/// content.
- void BeginModule(Module *M) {
- this->M = M;
- }
+ void BeginModule(Module *M, MachineModuleInfo *MMI);
/// EndModule - Emit all Dwarf sections that should come after the content.
///
DwarfException(raw_ostream &OS, AsmPrinter *A, const TargetAsmInfo *T);
virtual ~DwarfException();
- /// SetModuleInfo - Set machine module information when it's known that pass
- /// manager has created it. Set by the target AsmPrinter.
- void SetModuleInfo(MachineModuleInfo *mmi) {
- MMI = mmi;
- }
-
/// BeginModule - Emit all exception information that should come prior to the
/// content.
- void BeginModule(Module *M) {
- this->M = M;
+ void BeginModule(Module *m, MachineModuleInfo *mmi) {
+ this->M = m;
+ this->MMI = mmi;
}
/// EndModule - Emit all exception information that should come after the
const TargetAsmInfo *T) {
DE = new DwarfException(OS, A, T);
DD = new DwarfDebug(OS, A, T);
- DE->BeginModule(M);
- DD->BeginModule(M);
- DD->SetDebugInfo(MMI);
- DE->SetModuleInfo(MMI);
+ DE->BeginModule(M, MMI);
+ DD->BeginModule(M, MMI);
}
/// EndModule - Emit all Dwarf sections that should come after the content.