mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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
This commit is contained in:
@@ -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.";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user