Skip to content

Commit 93de5f1

Browse files
[CodeGen] Fix warnings
This patch fixes: llvm/lib/CodeGen/CallBrPrepare.cpp:154:14: error: unused variable 'IsDominated' [-Werror,-Wunused-variable] llvm/lib/CodeGen/CallBrPrepare.cpp:150:13: error: unused function 'PrintDebugDomInfo' [-Werror,-Wunused-function]
1 parent 0eabb88 commit 93de5f1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/CodeGen/CallBrPrepare.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,18 @@ static bool IsInSameBasicBlock(const Use &U, const BasicBlock *BB) {
147147
return I && I->getParent() == BB;
148148
}
149149

150+
#ifndef NDEBUG
150151
static void PrintDebugDomInfo(const DominatorTree &DT, const Use &U,
151152
const BasicBlock *BB, bool IsDefaultDest) {
152153
if (!isa<Instruction>(U.getUser()))
153154
return;
154-
const bool IsDominated = DT.dominates(BB, U);
155155
LLVM_DEBUG(dbgs() << "Use: " << *U.getUser() << ", in block "
156156
<< cast<Instruction>(U.getUser())->getParent()->getName()
157-
<< ", is " << (IsDominated ? "" : "NOT ") << "dominated by "
158-
<< BB->getName() << " (" << (IsDefaultDest ? "in" : "")
159-
<< "direct)\n");
157+
<< ", is " << (DT.dominates(BB, U) ? "" : "NOT ")
158+
<< "dominated by " << BB->getName() << " ("
159+
<< (IsDefaultDest ? "in" : "") << "direct)\n");
160160
}
161+
#endif
161162

162163
void CallBrPrepare::UpdateSSA(DominatorTree &DT, CallBrInst *CBR,
163164
CallInst *Intrinsic,

0 commit comments

Comments
 (0)