diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-07-03 00:10:29 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-03 00:10:29 +0000 |
| commit | 1a55180238dbcf11113f610aea010447e51f595b (patch) | |
| tree | b9769936054af70053271573496a228e18629946 /utils/TableGen/InstrInfoEmitter.cpp | |
| parent | 78236f8c8a0e6bd966afd7e461599336956f7772 (diff) | |
Replace std::iostreams with raw_ostream in TableGen.
- Sorry, I can't help myself.
- No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74742 91177308-0d34-0410-b5e6-96231b3b80d8
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 61dbe64af8..4502da176f 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."; } |
