diff options
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index 61dbe64..4502da1 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -16,11 +16,10 @@ #include "CodeGenTarget.h" #include "Record.h" #include <algorithm> -#include <iostream> using namespace llvm; static void PrintDefList(const std::vector<Record*> &Uses, - unsigned Num, std::ostream &OS) { + unsigned Num, raw_ostream &OS) { OS << "static const unsigned ImplicitList" << Num << "[] = { "; for (unsigned i = 0, e = Uses.size(); i != e; ++i) OS << getQualifiedName(Uses[i]) << ", "; @@ -28,7 +27,7 @@ static void PrintDefList(const std::vector<Record*> &Uses, } static void PrintBarriers(std::vector<Record*> &Barriers, - unsigned Num, std::ostream &OS) { + unsigned Num, raw_ostream &OS) { OS << "static const TargetRegisterClass* Barriers" << Num << "[] = { "; for (unsigned i = 0, e = Barriers.size(); i != e; ++i) OS << "&" << getQualifiedName(Barriers[i]) << "RegClass, "; @@ -123,7 +122,7 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) { return Result; } -void InstrInfoEmitter::EmitOperandInfo(std::ostream &OS, +void InstrInfoEmitter::EmitOperandInfo(raw_ostream &OS, OperandInfoMapTy &OperandInfoIDs) { // ID #0 is for no operand info. unsigned OperandListNum = 0; @@ -177,7 +176,7 @@ void InstrInfoEmitter::DetectRegisterClassBarriers(std::vector<Record*> &Defs, //===----------------------------------------------------------------------===// // run - Emit the main instruction description records for the target... -void InstrInfoEmitter::run(std::ostream &OS) { +void InstrInfoEmitter::run(raw_ostream &OS) { GatherItinClasses(); EmitSourceFileHeader("Target Instruction Descriptors", OS); @@ -243,7 +242,7 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num, std::map<std::vector<Record*>, unsigned> &EmittedLists, std::map<Record*, unsigned> &BarriersMap, const OperandInfoMapTy &OpInfo, - std::ostream &OS) { + raw_ostream &OS) { int MinOperands = 0; if (!Inst.OperandList.empty()) // Each logical operand can be multiple MI operands. @@ -323,7 +322,7 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num, void InstrInfoEmitter::emitShiftedValue(Record *R, StringInit *Val, - IntInit *ShiftInt, std::ostream &OS) { + IntInit *ShiftInt, raw_ostream &OS) { if (Val == 0 || ShiftInt == 0) throw std::string("Illegal value or shift amount in TargetInfo*!"); RecordVal *RV = R->getValue(Val->getValue()); @@ -375,7 +374,7 @@ void InstrInfoEmitter::emitShiftedValue(Record *R, StringInit *Val, return; } - std::cerr << "Unhandled initializer: " << *Val << "\n"; + errs() << "Unhandled initializer: " << *Val << "\n"; throw "In record '" + R->getName() + "' for TSFlag emission."; } |