diff options
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 11 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPC.h | 3 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 7 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.h | 4 |
4 files changed, 14 insertions, 11 deletions
diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index c5ed305a8d..8ea182537d 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -36,6 +36,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" @@ -52,7 +53,7 @@ namespace { std::set<std::string> FnStubs, GVStubs; const PPCSubtarget &Subtarget; - PPCAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T) + PPCAsmPrinter(raw_ostream &O, TargetMachine &TM, const TargetAsmInfo *T) : AsmPrinter(O, TM, T), Subtarget(TM.getSubtarget<PPCSubtarget>()) { } @@ -295,7 +296,7 @@ namespace { DwarfWriter DW; MachineModuleInfo *MMI; - PPCLinuxAsmPrinter(std::ostream &O, PPCTargetMachine &TM, + PPCLinuxAsmPrinter(raw_ostream &O, PPCTargetMachine &TM, const TargetAsmInfo *T) : PPCAsmPrinter(O, TM, T), DW(O, this, T), MMI(0) { } @@ -327,7 +328,7 @@ namespace { DwarfWriter DW; MachineModuleInfo *MMI; - PPCDarwinAsmPrinter(std::ostream &O, PPCTargetMachine &TM, + PPCDarwinAsmPrinter(raw_ostream &O, PPCTargetMachine &TM, const TargetAsmInfo *T) : PPCAsmPrinter(O, TM, T), DW(O, this, T), MMI(0) { } @@ -649,7 +650,7 @@ bool PPCLinuxAsmPrinter::doInitialization(Module &M) { /// PrintUnmangledNameSafely - Print out the printable characters in the name. /// Don't print things like \n or \0. -static void PrintUnmangledNameSafely(const Value *V, std::ostream &OS) { +static void PrintUnmangledNameSafely(const Value *V, raw_ostream &OS) { for (const char *Name = V->getNameStart(), *E = Name+V->getNameLen(); Name != E; ++Name) if (isprint(*Name)) @@ -1107,7 +1108,7 @@ bool PPCDarwinAsmPrinter::doFinalization(Module &M) { /// for a MachineFunction to the given output stream, in a format that the /// Darwin assembler can deal with. /// -FunctionPass *llvm::createPPCAsmPrinterPass(std::ostream &o, +FunctionPass *llvm::createPPCAsmPrinterPass(raw_ostream &o, PPCTargetMachine &tm) { const PPCSubtarget *Subtarget = &tm.getSubtarget<PPCSubtarget>(); diff --git a/lib/Target/PowerPC/PPC.h b/lib/Target/PowerPC/PPC.h index b9f64839ce..9a8e22e88d 100644 --- a/lib/Target/PowerPC/PPC.h +++ b/lib/Target/PowerPC/PPC.h @@ -25,10 +25,11 @@ namespace llvm { class PPCTargetMachine; class FunctionPass; class MachineCodeEmitter; + class raw_ostream; FunctionPass *createPPCBranchSelectionPass(); FunctionPass *createPPCISelDag(PPCTargetMachine &TM); -FunctionPass *createPPCAsmPrinterPass(std::ostream &OS, +FunctionPass *createPPCAsmPrinterPass(raw_ostream &OS, PPCTargetMachine &TM); FunctionPass *createPPCCodeEmitterPass(PPCTargetMachine &TM, MachineCodeEmitter &MCE); diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 7857848674..3d737515db 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -18,6 +18,7 @@ #include "llvm/PassManager.h" #include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; // Register the targets @@ -134,7 +135,7 @@ bool PPCTargetMachine::addPreEmitPass(PassManagerBase &PM, bool Fast) { } bool PPCTargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast, - std::ostream &Out) { + raw_ostream &Out) { assert(AsmPrinterCtor && "AsmPrinter was not linked in"); if (AsmPrinterCtor) PM.add(AsmPrinterCtor(Out, *this)); @@ -167,7 +168,7 @@ bool PPCTargetMachine::addCodeEmitter(PassManagerBase &PM, bool Fast, if (DumpAsm) { assert(AsmPrinterCtor && "AsmPrinter was not linked in"); if (AsmPrinterCtor) - PM.add(AsmPrinterCtor(*cerr.stream(), *this)); + PM.add(AsmPrinterCtor(errs(), *this)); } return false; @@ -180,7 +181,7 @@ bool PPCTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, bool Fast, if (DumpAsm) { assert(AsmPrinterCtor && "AsmPrinter was not linked in"); if (AsmPrinterCtor) - PM.add(AsmPrinterCtor(*cerr.stream(), *this)); + PM.add(AsmPrinterCtor(errs(), *this)); } return false; diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h index 58fd55d552..8d65fd2479 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.h +++ b/lib/Target/PowerPC/PPCTargetMachine.h @@ -44,7 +44,7 @@ protected: // To avoid having target depend on the asmprinter stuff libraries, asmprinter // set this functions to ctor pointer at startup time if they are linked in. - typedef FunctionPass *(*AsmPrinterCtorFn)(std::ostream &o, + typedef FunctionPass *(*AsmPrinterCtorFn)(raw_ostream &o, PPCTargetMachine &tm); static AsmPrinterCtorFn AsmPrinterCtor; @@ -78,7 +78,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); virtual bool addCodeEmitter(PassManagerBase &PM, bool Fast, bool DumpAsm, MachineCodeEmitter &MCE); virtual bool addSimpleCodeEmitter(PassManagerBase &PM, bool Fast, |