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

@@ -22,9 +22,10 @@ namespace llvm {
class FunctionPassManager;
class FunctionPass;
class MachineCodeEmitter;
class raw_ostream;
FunctionPass *createPIC16ISelDag(PIC16TargetMachine &TM);
FunctionPass *createPIC16CodePrinterPass(std::ostream &OS,
FunctionPass *createPIC16CodePrinterPass(raw_ostream &OS,
PIC16TargetMachine &TM);
} // end namespace llvm;

View File

@@ -31,6 +31,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/Mangler.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
@@ -43,7 +44,7 @@ STATISTIC(EmittedInsts, "Number of machine instrs printed");
namespace {
struct VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter {
PIC16AsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
PIC16AsmPrinter(raw_ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
: AsmPrinter(O, TM, T) {
}
@@ -109,7 +110,7 @@ namespace {
/// using the given target machine description. This should work
/// regardless of whether the function is in SSA form.
///
FunctionPass *llvm::createPIC16CodePrinterPass(std::ostream &o,
FunctionPass *llvm::createPIC16CodePrinterPass(raw_ostream &o,
PIC16TargetMachine &tm) {
return new PIC16AsmPrinter(o, tm, tm.getTargetAsmInfo());
}
@@ -275,7 +276,7 @@ printOperand(const MachineInstr *MI, int opNum, const char *Modifier)
}
static void
printSOImm(std::ostream &O, int64_t V, const TargetAsmInfo *TAI)
printSOImm(raw_ostream &O, int64_t V, const TargetAsmInfo *TAI)
{
assert(V < (1 << 12) && "Not a valid so_imm value!");

View File

@@ -61,7 +61,7 @@ bool PIC16TargetMachine::addPreEmitPass(PassManagerBase &PM, bool Fast)
}
bool PIC16TargetMachine::
addAssemblyEmitter(PassManagerBase &PM, bool Fast, std::ostream &Out)
addAssemblyEmitter(PassManagerBase &PM, bool Fast, raw_ostream &Out)
{
// Output assembly language.
PM.add(createPIC16CodePrinterPass(Out, *this));

View File

@@ -54,7 +54,7 @@ public:
virtual bool addPrologEpilogInserter(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