[llvm-commits] [llvm] r100325 - in /llvm/trunk: include/llvm/CodeGen/DwarfWriter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/CodeGen/AsmPrinter/DwarfDebug.h lib/CodeGen/AsmPrinter/DwarfException.cpp lib/CodeGen/AsmPrinter/DwarfException.h lib/CodeGen/AsmPrinter/DwarfPrinter.cpp lib/CodeGen/AsmPrinter/DwarfPrinter.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 4 00:48:20 PDT 2010
Author: lattner
Date: Sun Apr 4 02:48:20 2010
New Revision: 100325
URL: http://llvm.org/viewvc/llvm-project?rev=100325&view=rev
Log:
remove the raw_ostream from various dwarf printing things.
The only thing left is LEB printing, which uses EmitRawText
for now.
Modified:
llvm/trunk/include/llvm/CodeGen/DwarfWriter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/DwarfWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DwarfWriter.h?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DwarfWriter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DwarfWriter.h Sun Apr 4 02:48:20 2010
@@ -68,8 +68,7 @@
/// BeginModule - Emit all Dwarf sections that should come prior to the
/// content.
- void BeginModule(Module *M, MachineModuleInfo *MMI, raw_ostream &OS,
- AsmPrinter *A, const MCAsmInfo *T);
+ void BeginModule(Module *M, AsmPrinter *A);
/// EndModule - Emit all Dwarf sections that should come after the content.
///
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sun Apr 4 02:48:20 2010
@@ -137,7 +137,7 @@
DW = getAnalysisIfAvailable<DwarfWriter>();
if (DW)
- DW->BeginModule(&M, MMI, O, this, MAI);
+ DW->BeginModule(&M, this);
return false;
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sun Apr 4 02:48:20 2010
@@ -298,8 +298,8 @@
} // end llvm namespace
-DwarfDebug::DwarfDebug(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T)
- : DwarfPrinter(OS, A, T), ModuleCU(0),
+DwarfDebug::DwarfDebug(AsmPrinter *A)
+ : DwarfPrinter(A), ModuleCU(0),
AbbreviationsSet(InitAbbreviationsSetSize), Abbreviations(),
DIEBlocks(), SectionSourceLines(), didInitial(false), shouldEmit(false),
CurrentFnDbgScope(0), DebugTimer(0) {
@@ -1780,7 +1780,7 @@
/// 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) {
+void DwarfDebug::beginModule(Module *M) {
this->M = M;
if (!MAI->doesSupportDebugInformation())
@@ -1809,7 +1809,7 @@
E = DbgFinder.global_variable_end(); I != E; ++I)
constructGlobalVariableDIE(*I);
- MMI = mmi;
+ MMI = Asm->MMI;
shouldEmit = true;
MMI->setDebugInfoAvailability(true);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Sun Apr 4 02:48:20 2010
@@ -487,8 +487,8 @@
/// GetOrCreateSourceID - Look up the source id with the given directory and
/// source file names. If none currently exists, create a new id and insert it
- /// in the SourceIds map. This can update DirectoryNames and SourceFileNames maps
- /// as well.
+ /// in the SourceIds map. This can update DirectoryNames and SourceFileNames
+ /// maps as well.
unsigned GetOrCreateSourceID(StringRef DirName, StringRef FileName);
void constructCompileUnit(MDNode *N);
@@ -507,7 +507,7 @@
//===--------------------------------------------------------------------===//
// Main entry points.
//
- DwarfDebug(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T);
+ DwarfDebug(AsmPrinter *A);
virtual ~DwarfDebug();
/// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
@@ -516,7 +516,7 @@
/// beginModule - Emit all Dwarf sections that should come prior to the
/// content.
- void beginModule(Module *M, MachineModuleInfo *MMI);
+ void beginModule(Module *M);
/// endModule - Emit all Dwarf sections that should come after the content.
///
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Sun Apr 4 02:48:20 2010
@@ -37,9 +37,8 @@
#include "llvm/ADT/Twine.h"
using namespace llvm;
-DwarfException::DwarfException(raw_ostream &OS, AsmPrinter *A,
- const MCAsmInfo *T)
- : DwarfPrinter(OS, A, T), shouldEmitTable(false),shouldEmitMoves(false),
+DwarfException::DwarfException(AsmPrinter *A)
+ : DwarfPrinter(A), shouldEmitTable(false), shouldEmitMoves(false),
shouldEmitTableModule(false), shouldEmitMovesModule(false),
ExceptionTimer(0) {
if (TimePassesIsEnabled)
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h Sun Apr 4 02:48:20 2010
@@ -166,14 +166,14 @@
//===--------------------------------------------------------------------===//
// Main entry points.
//
- DwarfException(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T);
+ DwarfException(AsmPrinter *A);
virtual ~DwarfException();
/// BeginModule - Emit all exception information that should come prior to the
/// content.
- void BeginModule(Module *m, MachineModuleInfo *mmi) {
+ void BeginModule(Module *m) {
this->M = m;
- this->MMI = mmi;
+ this->MMI = Asm->MMI;
}
/// EndModule - Emit all exception information that should come after the
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Sun Apr 4 02:48:20 2010
@@ -31,8 +31,8 @@
#include "llvm/ADT/SmallString.h"
using namespace llvm;
-DwarfPrinter::DwarfPrinter(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T)
-: O(OS), Asm(A), MAI(T), TD(Asm->TM.getTargetData()),
+DwarfPrinter::DwarfPrinter(AsmPrinter *A)
+: Asm(A), MAI(A->MAI), TD(Asm->TM.getTargetData()),
RI(Asm->TM.getRegisterInfo()), M(NULL), MF(NULL), MMI(NULL),
SubprogramCount(0) {}
@@ -139,8 +139,7 @@
if (MAI->hasLEB128()) {
// FIXME: MCize.
- O << "\t.sleb128\t" << Value;
- Asm->OutStreamer.AddBlankLine();
+ Asm->OutStreamer.EmitRawText("\t.sleb128\t" + Twine(Value));
return;
}
@@ -165,8 +164,7 @@
if (MAI->hasLEB128() && PadTo == 0) {
// FIXME: MCize.
- O << "\t.uleb128\t" << Value;
- Asm->OutStreamer.AddBlankLine();
+ Asm->OutStreamer.EmitRawText("\t.uleb128\t" + Twine(Value));
return;
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h Sun Apr 4 02:48:20 2010
@@ -39,9 +39,6 @@
// Core attributes used by the DWARF printer.
//
- /// O - Stream to .s file.
- raw_ostream &O;
-
/// Asm - Target of Dwarf emission.
AsmPrinter *Asm;
@@ -66,7 +63,7 @@
/// SubprogramCount - The running count of functions being compiled.
unsigned SubprogramCount;
- DwarfPrinter(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T);
+ DwarfPrinter(AsmPrinter *A);
public:
//===------------------------------------------------------------------===//
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=100325&r1=100324&r2=100325&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Sun Apr 4 02:48:20 2010
@@ -36,14 +36,11 @@
/// BeginModule - Emit all Dwarf sections that should come prior to the
/// content.
-void DwarfWriter::BeginModule(Module *M,
- MachineModuleInfo *MMI,
- raw_ostream &OS, AsmPrinter *A,
- const MCAsmInfo *T) {
- DE = new DwarfException(OS, A, T);
- DD = new DwarfDebug(OS, A, T);
- DE->BeginModule(M, MMI);
- DD->beginModule(M, MMI);
+void DwarfWriter::BeginModule(Module *M, AsmPrinter *A) {
+ DE = new DwarfException(A);
+ DD = new DwarfDebug(A);
+ DE->BeginModule(M);
+ DD->beginModule(M);
}
/// EndModule - Emit all Dwarf sections that should come after the content.
More information about the llvm-commits
mailing list