mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76965 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Support/Streams.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
@ -819,6 +820,9 @@ void LiveInterval::ComputeJoinedWeight(const LiveInterval &Other) {
|
||||
std::ostream& llvm::operator<<(std::ostream& os, const LiveRange &LR) {
|
||||
return os << '[' << LR.start << ',' << LR.end << ':' << LR.valno->id << ")";
|
||||
}
|
||||
raw_ostream& llvm::operator<<(raw_ostream& os, const LiveRange &LR) {
|
||||
return os << '[' << LR.start << ',' << LR.end << ':' << LR.valno->id << ")";
|
||||
}
|
||||
|
||||
void LiveRange::dump() const {
|
||||
cerr << *this << "\n";
|
||||
@ -826,6 +830,12 @@ void LiveRange::dump() const {
|
||||
|
||||
void LiveInterval::print(std::ostream &OS,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
raw_os_ostream RawOS(OS);
|
||||
print(RawOS, TRI);
|
||||
}
|
||||
|
||||
void LiveInterval::print(raw_ostream &OS,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
if (isStackSlot())
|
||||
OS << "SS#" << getStackSlotIndex();
|
||||
else if (TRI && TargetRegisterInfo::isPhysicalRegister(reg))
|
||||
@ -890,3 +900,6 @@ void LiveInterval::dump() const {
|
||||
void LiveRange::print(std::ostream &os) const {
|
||||
os << *this;
|
||||
}
|
||||
void LiveRange::print(raw_ostream &os) const {
|
||||
os << *this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user