mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Mark dump() methods as const. NFC
Add const qualifier to any dump() method where adding one was trivial. Differential Revision: https://reviews.llvm.org/D34481 llvm-svn: 305963
This commit is contained in:
parent
ca766419df
commit
b5685bbe56
@ -121,8 +121,8 @@ public:
|
||||
/// Print the abbreviation using the specified asm printer.
|
||||
void Emit(const AsmPrinter *AP) const;
|
||||
|
||||
void print(raw_ostream &O);
|
||||
void dump();
|
||||
void print(raw_ostream &O) const;
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
@ -780,7 +780,7 @@ public:
|
||||
DIEValue findAttribute(dwarf::Attribute Attribute) const;
|
||||
|
||||
void print(raw_ostream &O, unsigned IndentCount = 0) const;
|
||||
void dump();
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
@ -196,7 +196,7 @@ public:
|
||||
}
|
||||
|
||||
/// dump - Print data structures to dbgs().
|
||||
void dump();
|
||||
void dump() const;
|
||||
|
||||
/// getOrCreateAbstractScope - Find or create an abstract lexical scope.
|
||||
LexicalScope *getOrCreateAbstractScope(const DILocalScope *Scope);
|
||||
|
@ -203,7 +203,7 @@ public:
|
||||
MachineBasicBlock::iterator End,
|
||||
unsigned NumRegionInstrs) {}
|
||||
|
||||
virtual void dumpPolicy() {}
|
||||
virtual void dumpPolicy() const {}
|
||||
|
||||
/// Check if pressure tracking is needed before building the DAG and
|
||||
/// initializing this strategy. Called after initPolicy.
|
||||
@ -555,7 +555,7 @@ public:
|
||||
return Queue.begin() + idx;
|
||||
}
|
||||
|
||||
void dump();
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
/// Summarize the unscheduled region.
|
||||
@ -756,7 +756,7 @@ public:
|
||||
SUnit *pickOnlyChoice();
|
||||
|
||||
#ifndef NDEBUG
|
||||
void dumpScheduledState();
|
||||
void dumpScheduledState() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -890,7 +890,7 @@ public:
|
||||
MachineBasicBlock::iterator End,
|
||||
unsigned NumRegionInstrs) override;
|
||||
|
||||
void dumpPolicy() override;
|
||||
void dumpPolicy() const override;
|
||||
|
||||
bool shouldTrackPressure() const override {
|
||||
return RegionPolicy.ShouldTrackPressure;
|
||||
|
@ -413,7 +413,7 @@ public:
|
||||
|
||||
/// @}
|
||||
|
||||
void dump();
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
/// \brief Compute the amount of padding required before the fragment \p F to
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
/// \brief Return true if given frgment has FT_Dummy type.
|
||||
bool isDummy() const { return Kind == FT_Dummy; }
|
||||
|
||||
void dump();
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
class MCDummyFragment : public MCFragment {
|
||||
|
@ -167,7 +167,7 @@ public:
|
||||
|
||||
MCSection::iterator getSubsectionInsertionPoint(unsigned Subsection);
|
||||
|
||||
void dump();
|
||||
void dump() const;
|
||||
|
||||
virtual void PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
|
||||
raw_ostream &OS,
|
||||
|
@ -209,7 +209,7 @@ private:
|
||||
// Other helper routines
|
||||
bool processInstruction(Instruction *I);
|
||||
bool processBlock(BasicBlock *BB);
|
||||
void dump(DenseMap<uint32_t, Value *> &d);
|
||||
void dump(DenseMap<uint32_t, Value *> &d) const;
|
||||
bool iterateOnFunction(Function &F);
|
||||
bool performPRE(Function &F);
|
||||
bool performScalarPRE(Instruction *I);
|
||||
|
@ -105,7 +105,7 @@ void DIEAbbrev::Emit(const AsmPrinter *AP) const {
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD
|
||||
void DIEAbbrev::print(raw_ostream &O) {
|
||||
void DIEAbbrev::print(raw_ostream &O) const {
|
||||
O << "Abbreviation @"
|
||||
<< format("0x%lx", (long)(intptr_t)this)
|
||||
<< " "
|
||||
@ -128,7 +128,7 @@ void DIEAbbrev::print(raw_ostream &O) {
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void DIEAbbrev::dump() {
|
||||
LLVM_DUMP_METHOD void DIEAbbrev::dump() const {
|
||||
print(dbgs());
|
||||
}
|
||||
#endif
|
||||
@ -268,7 +268,7 @@ void DIE::print(raw_ostream &O, unsigned IndentCount) const {
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void DIE::dump() {
|
||||
LLVM_DUMP_METHOD void DIE::dump() const {
|
||||
print(dbgs());
|
||||
}
|
||||
#endif
|
||||
|
@ -1006,7 +1006,7 @@ bool LiveDebugVariables::doInitialization(Module &M) {
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void LiveDebugVariables::dump() {
|
||||
LLVM_DUMP_METHOD void LiveDebugVariables::dump() const {
|
||||
if (pImpl)
|
||||
static_cast<LDVImpl*>(pImpl)->print(dbgs());
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
void emitDebugValues(VirtRegMap *VRM);
|
||||
|
||||
/// dump - Print data structures to dbgs().
|
||||
void dump();
|
||||
void dump() const;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -542,7 +542,7 @@ void MachineSchedulerBase::print(raw_ostream &O, const Module* m) const {
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void ReadyQueue::dump() {
|
||||
LLVM_DUMP_METHOD void ReadyQueue::dump() const {
|
||||
dbgs() << "Queue " << Name << ": ";
|
||||
for (const SUnit *SU : Queue)
|
||||
dbgs() << SU->NodeNum << " ";
|
||||
@ -2309,7 +2309,7 @@ SUnit *SchedBoundary::pickOnlyChoice() {
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
// This is useful information to dump after bumpNode.
|
||||
// Note that the Queue contents are more useful before pickNodeFromQueue.
|
||||
LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() {
|
||||
LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() const {
|
||||
unsigned ResFactor;
|
||||
unsigned ResCount;
|
||||
if (ZoneCritResIdx) {
|
||||
@ -2648,7 +2648,7 @@ void GenericScheduler::initPolicy(MachineBasicBlock::iterator Begin,
|
||||
}
|
||||
}
|
||||
|
||||
void GenericScheduler::dumpPolicy() {
|
||||
void GenericScheduler::dumpPolicy() const {
|
||||
// Cannot completely remove virtual function even in release mode.
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
dbgs() << "GenericScheduler RegionPolicy: "
|
||||
|
@ -307,7 +307,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) {
|
||||
} // end namespace llvm
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void MCFragment::dump() {
|
||||
LLVM_DUMP_METHOD void MCFragment::dump() const {
|
||||
raw_ostream &OS = errs();
|
||||
|
||||
OS << "<";
|
||||
@ -445,19 +445,19 @@ LLVM_DUMP_METHOD void MCFragment::dump() {
|
||||
OS << ">";
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD void MCAssembler::dump() {
|
||||
LLVM_DUMP_METHOD void MCAssembler::dump() const{
|
||||
raw_ostream &OS = errs();
|
||||
|
||||
OS << "<MCAssembler\n";
|
||||
OS << " Sections:[\n ";
|
||||
for (iterator it = begin(), ie = end(); it != ie; ++it) {
|
||||
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
|
||||
if (it != begin()) OS << ",\n ";
|
||||
it->dump();
|
||||
}
|
||||
OS << "],\n";
|
||||
OS << " Symbols:[";
|
||||
|
||||
for (symbol_iterator it = symbol_begin(), ie = symbol_end(); it != ie; ++it) {
|
||||
for (const_symbol_iterator it = symbol_begin(), ie = symbol_end(); it != ie; ++it) {
|
||||
if (it != symbol_begin()) OS << ",\n ";
|
||||
OS << "(";
|
||||
it->dump();
|
||||
|
@ -86,7 +86,7 @@ MCSection::getSubsectionInsertionPoint(unsigned Subsection) {
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void MCSection::dump() {
|
||||
LLVM_DUMP_METHOD void MCSection::dump() const {
|
||||
raw_ostream &OS = errs();
|
||||
|
||||
OS << "<MCSection";
|
||||
|
@ -72,7 +72,7 @@ class SystemZPostRASchedStrategy : public MachineSchedStrategy {
|
||||
// A set of SUs with a sorter and dump method.
|
||||
struct SUSet : std::set<SUnit*, SUSorter> {
|
||||
#ifndef NDEBUG
|
||||
void dump(SystemZHazardRecognizer &HazardRec);
|
||||
void dump(SystemZHazardRecognizer &HazardRec) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -602,7 +602,7 @@ PreservedAnalyses GVN::run(Function &F, FunctionAnalysisManager &AM) {
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void GVN::dump(DenseMap<uint32_t, Value*>& d) {
|
||||
LLVM_DUMP_METHOD void GVN::dump(DenseMap<uint32_t, Value*>& d) const {
|
||||
errs() << "{\n";
|
||||
for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
|
||||
E = d.end(); I != E; ++I) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user