mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Add NDEBUG checks around LLVM_DUMP_METHOD functions for Wunused-function warnings.
llvm-svn: 318373
This commit is contained in:
parent
41da73a555
commit
42cba5c5cb
@ -103,6 +103,7 @@ public:
|
||||
explicit PrintState(int State) : State(State) {}
|
||||
};
|
||||
|
||||
#ifndef NDEBUG
|
||||
static raw_ostream &operator<<(raw_ostream &OS, const PrintState &PS) {
|
||||
if (PS.State & StateWQM)
|
||||
OS << "WQM";
|
||||
@ -119,6 +120,7 @@ static raw_ostream &operator<<(raw_ostream &OS, const PrintState &PS) {
|
||||
|
||||
return OS;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct InstrInfo {
|
||||
char Needs = 0;
|
||||
@ -219,7 +221,8 @@ FunctionPass *llvm::createSIWholeQuadModePass() {
|
||||
return new SIWholeQuadMode;
|
||||
}
|
||||
|
||||
void SIWholeQuadMode::printInfo() {
|
||||
#ifndef NDEBUG
|
||||
LLVM_DEBUG_METHOD void SIWholeQuadMode::printInfo() {
|
||||
for (const auto &BII : Blocks) {
|
||||
dbgs() << "\nBB#" << BII.first->getNumber() << ":\n"
|
||||
<< " InNeeds = " << PrintState(BII.second.InNeeds)
|
||||
@ -236,6 +239,7 @@ void SIWholeQuadMode::printInfo() {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void SIWholeQuadMode::markInstruction(MachineInstr &MI, char Flag,
|
||||
std::vector<WorkItem> &Worklist) {
|
||||
|
@ -548,13 +548,14 @@ static unsigned ReplaceCounter = 0;
|
||||
|
||||
char HCE::ID = 0;
|
||||
|
||||
#ifndef NDEBUG
|
||||
LLVM_DUMP_METHOD void RangeTree::dump() const {
|
||||
dbgs() << "Root: " << Root << '\n';
|
||||
if (Root)
|
||||
dump(Root);
|
||||
}
|
||||
|
||||
void RangeTree::dump(const Node *N) const {
|
||||
LLVM_DUMP_METHOD void RangeTree::dump(const Node *N) const {
|
||||
dbgs() << "Node: " << N << '\n';
|
||||
dbgs() << " Height: " << N->Height << '\n';
|
||||
dbgs() << " Count: " << N->Count << '\n';
|
||||
@ -568,6 +569,7 @@ void RangeTree::dump(const Node *N) const {
|
||||
if (N->Right)
|
||||
dump(N->Right);
|
||||
}
|
||||
#endif
|
||||
|
||||
void RangeTree::order(Node *N, SmallVectorImpl<Node*> &Seq) const {
|
||||
if (N == nullptr)
|
||||
|
Loading…
Reference in New Issue
Block a user