MachineFunction: Add a const modifier to print() parameter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun 2016-05-05 18:14:43 +00:00
parent b69177e91e
commit d170aeaa5b
4 changed files with 7 additions and 6 deletions

View File

@ -674,9 +674,9 @@ public:
// Debugging methods.
void dump() const;
void print(raw_ostream &OS, SlotIndexes* = nullptr) const;
void print(raw_ostream &OS, const SlotIndexes* = nullptr) const;
void print(raw_ostream &OS, ModuleSlotTracker &MST,
SlotIndexes * = nullptr) const;
const SlotIndexes* = nullptr) const;
// Printing method used by LoopInfo.
void printAsOperand(raw_ostream &OS, bool PrintType = true) const;

View File

@ -391,7 +391,7 @@ public:
/// print - Print out the MachineFunction in a format suitable for debugging
/// to the specified stream.
///
void print(raw_ostream &OS, SlotIndexes* = nullptr) const;
void print(raw_ostream &OS, const SlotIndexes* = nullptr) const;
/// viewCFG - This function is meant for use from the debugger. You can just
/// say 'call F->viewCFG()' and a ghostview window should pop up from the

View File

@ -230,7 +230,8 @@ std::string MachineBasicBlock::getFullName() const {
return Name;
}
void MachineBasicBlock::print(raw_ostream &OS, SlotIndexes *Indexes) const {
void MachineBasicBlock::print(raw_ostream &OS, const SlotIndexes *Indexes)
const {
const MachineFunction *MF = getParent();
if (!MF) {
OS << "Can't print out MachineBasicBlock because parent MachineFunction"
@ -244,7 +245,7 @@ void MachineBasicBlock::print(raw_ostream &OS, SlotIndexes *Indexes) const {
}
void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST,
SlotIndexes *Indexes) const {
const SlotIndexes *Indexes) const {
const MachineFunction *MF = getParent();
if (!MF) {
OS << "Can't print out MachineBasicBlock because parent MachineFunction"

View File

@ -406,7 +406,7 @@ StringRef MachineFunction::getName() const {
return getFunction()->getName();
}
void MachineFunction::print(raw_ostream &OS, SlotIndexes *Indexes) const {
void MachineFunction::print(raw_ostream &OS, const SlotIndexes *Indexes) const {
OS << "# Machine code for function " << getName() << ": ";
OS << "Properties: <";
getProperties().print(OS);