mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Added missing print functions that take a raw_ostream
llvm-svn: 57339
This commit is contained in:
parent
ec4d25ea4b
commit
3b3ab0fa30
@ -164,6 +164,11 @@ bool MachineOperand::isIdenticalTo(const MachineOperand &Other) const {
|
||||
/// print - Print the specified machine operand.
|
||||
///
|
||||
void MachineOperand::print(std::ostream &OS, const TargetMachine *TM) const {
|
||||
raw_os_ostream RawOS(OS);
|
||||
print(RawOS, TM);
|
||||
}
|
||||
|
||||
void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {
|
||||
switch (getType()) {
|
||||
case MachineOperand::MO_Register:
|
||||
if (getReg() == 0 || TargetRegisterInfo::isVirtualRegister(getReg())) {
|
||||
@ -768,6 +773,11 @@ void MachineInstr::dump() const {
|
||||
}
|
||||
|
||||
void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const {
|
||||
raw_os_ostream RawOS(OS);
|
||||
print(RawOS, TM);
|
||||
}
|
||||
|
||||
void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
|
||||
// Specialize printing if op#0 is definition
|
||||
unsigned StartOp = 0;
|
||||
if (getNumOperands() && getOperand(0).isReg() && getOperand(0).isDef()) {
|
||||
@ -810,8 +820,7 @@ void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const {
|
||||
else if (!V->getName().empty())
|
||||
OS << V->getName();
|
||||
else if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(V)) {
|
||||
raw_os_ostream OSS(OS);
|
||||
PSV->print(OSS);
|
||||
PSV->print(OS);
|
||||
} else
|
||||
OS << V;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user