diff options
author | David Greene <greened@obbligato.org> | 2009-07-14 20:18:05 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-07-14 20:18:05 +0000 |
commit | 71847813bc419f7a0667468136a07429c6d9f164 (patch) | |
tree | 6cd09f8ff7f7b28b32c364fb6f63f44e85937880 /lib/Target/Mips | |
parent | a266b5f22811480a65e65a08c8a5d92fe9be8a3b (diff) | |
download | external_llvm-71847813bc419f7a0667468136a07429c6d9f164.zip external_llvm-71847813bc419f7a0667468136a07429c6d9f164.tar.gz external_llvm-71847813bc419f7a0667468136a07429c6d9f164.tar.bz2 |
Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r-- | lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 6 | ||||
-rw-r--r-- | lib/Target/Mips/Mips.h | 4 | ||||
-rw-r--r-- | lib/Target/Mips/MipsTargetMachine.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Mips/MipsTargetMachine.h | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp index 55f3378..719c2586 100644 --- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp @@ -39,8 +39,8 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Debug.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Support/raw_ostream.h" #include <cctype> using namespace llvm; @@ -51,7 +51,7 @@ namespace { class VISIBILITY_HIDDEN MipsAsmPrinter : public AsmPrinter { const MipsSubtarget *Subtarget; public: - explicit MipsAsmPrinter(raw_ostream &O, MipsTargetMachine &TM, + explicit MipsAsmPrinter(formatted_raw_ostream &O, MipsTargetMachine &TM, const TargetAsmInfo *T, bool V) : AsmPrinter(O, TM, T, V) { Subtarget = &TM.getSubtarget<MipsSubtarget>(); @@ -91,7 +91,7 @@ namespace { /// assembly code for a MachineFunction to the given output stream, /// using the given target machine description. This should work /// regardless of whether the function is in SSA form. -FunctionPass *llvm::createMipsCodePrinterPass(raw_ostream &o, +FunctionPass *llvm::createMipsCodePrinterPass(formatted_raw_ostream &o, MipsTargetMachine &tm, bool verbose) { return new MipsAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); diff --git a/lib/Target/Mips/Mips.h b/lib/Target/Mips/Mips.h index 9b22a91..c1d6fdd 100644 --- a/lib/Target/Mips/Mips.h +++ b/lib/Target/Mips/Mips.h @@ -21,11 +21,11 @@ namespace llvm { class MipsTargetMachine; class FunctionPass; class MachineCodeEmitter; - class raw_ostream; + class formatted_raw_ostream; FunctionPass *createMipsISelDag(MipsTargetMachine &TM); FunctionPass *createMipsDelaySlotFillerPass(MipsTargetMachine &TM); - FunctionPass *createMipsCodePrinterPass(raw_ostream &OS, + FunctionPass *createMipsCodePrinterPass(formatted_raw_ostream &OS, MipsTargetMachine &TM, bool Verbose); } // end namespace llvm; diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index 4675536..1e6add4 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -131,7 +131,7 @@ addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel) // true if AssemblyEmitter is supported bool MipsTargetMachine:: addAssemblyEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - bool Verbose, raw_ostream &Out) { + bool Verbose, formatted_raw_ostream &Out) { // Output assembly language. assert(AsmPrinterCtor && "AsmPrinter was not linked in"); PM.add(AsmPrinterCtor(Out, *this, Verbose)); diff --git a/lib/Target/Mips/MipsTargetMachine.h b/lib/Target/Mips/MipsTargetMachine.h index 95e5be4..7dd8d2b 100644 --- a/lib/Target/Mips/MipsTargetMachine.h +++ b/lib/Target/Mips/MipsTargetMachine.h @@ -22,7 +22,7 @@ #include "llvm/Target/TargetFrameInfo.h" namespace llvm { - class raw_ostream; + class formatted_raw_ostream; class MipsTargetMachine : public LLVMTargetMachine { MipsSubtarget Subtarget; @@ -37,7 +37,7 @@ namespace llvm { // 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)(raw_ostream &o, + typedef FunctionPass *(*AsmPrinterCtorFn)(formatted_raw_ostream &o, MipsTargetMachine &tm, bool verbose); static AsmPrinterCtorFn AsmPrinterCtor; @@ -75,7 +75,7 @@ namespace llvm { CodeGenOpt::Level OptLevel); virtual bool addAssemblyEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - bool Verbose, raw_ostream &Out); + bool Verbose, formatted_raw_ostream &Out); }; /// MipselTargetMachine - Mipsel target machine. |