Use raw_ostream throughout the AsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2008-08-21 00:14:44 +00:00
parent f4a97da407
commit cb37188323
66 changed files with 448 additions and 180 deletions

View File

@ -21,9 +21,10 @@
namespace llvm {
class FunctionPass;
class TargetMachine;
class raw_ostream;
FunctionPass *createSparcISelDag(TargetMachine &TM);
FunctionPass *createSparcCodePrinterPass(std::ostream &OS, TargetMachine &TM);
FunctionPass *createSparcCodePrinterPass(raw_ostream &OS, TargetMachine &TM);
FunctionPass *createSparcDelaySlotFillerPass(TargetMachine &TM);
FunctionPass *createSparcFPMoverPass(TargetMachine &TM);
} // end namespace llvm;

View File

@ -26,6 +26,7 @@
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/Mangler.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/CommandLine.h"
@ -39,7 +40,7 @@ STATISTIC(EmittedInsts, "Number of machine instrs printed");
namespace {
struct VISIBILITY_HIDDEN SparcAsmPrinter : public AsmPrinter {
SparcAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
SparcAsmPrinter(raw_ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
: AsmPrinter(O, TM, T) {
}
@ -75,7 +76,7 @@ namespace {
/// using the given target machine description. This should work
/// regardless of whether the function is in SSA form.
///
FunctionPass *llvm::createSparcCodePrinterPass(std::ostream &o,
FunctionPass *llvm::createSparcCodePrinterPass(raw_ostream &o,
TargetMachine &tm) {
return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
}

View File

@ -75,7 +75,7 @@ bool SparcTargetMachine::addPreEmitPass(PassManagerBase &PM, bool Fast) {
}
bool SparcTargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast,
std::ostream &Out) {
raw_ostream &Out) {
// Output assembly language.
PM.add(createSparcCodePrinterPass(Out, *this));
return false;

View File

@ -49,7 +49,7 @@ public:
virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
std::ostream &Out);
raw_ostream &Out);
};
} // end namespace llvm