mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 09:54:09 +00:00
Add NDEBUG checks around LLVM_DUMP_METHOD functions for Wunused-function warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9fbb168a9
commit
ea5836a7a6
@ -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