aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-06-25 22:36:02 +0000
committerDevang Patel <dpatel@apple.com>2009-06-25 22:36:02 +0000
commit208622db8a3f1d796bfaf61f8d4f41b6613a71bd (patch)
tree7946a916a00d45c91afb890bac3dc6812b8063a6 /lib/CodeGen
parent9e03cbefc5b3b8772a18d9bd25593ce62137ac85 (diff)
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp9
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.h11
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfWriter.cpp6
4 files changed, 12 insertions, 22 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 7f9894d39e..e8a42b6075 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1371,9 +1371,12 @@ bool DwarfDebug::ConstructSubprograms() {
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();
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 9824566198..5bd666dabd 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -486,15 +486,9 @@ public:
/// 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.
///
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.h b/lib/CodeGen/AsmPrinter/DwarfException.h
index 4479af243e..f1c3e56423 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.h
+++ b/lib/CodeGen/AsmPrinter/DwarfException.h
@@ -149,16 +149,11 @@ public:
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
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 483ee559ff..89084989b8 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -42,10 +42,8 @@ void DwarfWriter::BeginModule(Module *M,
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.