1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Fix variable set but no used warnings on NDEBUG builds. NFCI.

llvm-svn: 370319
This commit is contained in:
Simon Pilgrim 2019-08-29 10:08:45 +00:00
parent 951969fbe6
commit 4d3ff7ac63

View File

@ -428,16 +428,16 @@ void IRPosition::verify() {
assert(KindOrArgNo >= 0 && "Expected argument or call site argument!");
assert((isa<CallBase>(AnchorVal) || isa<Argument>(AnchorVal)) &&
"Expected call base or argument for positive attribute index!");
if (auto *Arg = dyn_cast<Argument>(AnchorVal)) {
assert(Arg->getArgNo() == unsigned(getArgNo()) &&
if (isa<Argument>(AnchorVal)) {
assert(cast<Argument>(AnchorVal)->getArgNo() == unsigned(getArgNo()) &&
"Argument number mismatch!");
assert(Arg == &getAssociatedValue() && "Associated value mismatch!");
assert(cast<Argument>(AnchorVal) == &getAssociatedValue() &&
"Associated value mismatch!");
} else {
auto &CB = cast<CallBase>(*AnchorVal);
(void)CB;
assert(CB.arg_size() > unsigned(getArgNo()) &&
assert(cast<CallBase>(*AnchorVal).arg_size() > unsigned(getArgNo()) &&
"Call site argument number mismatch!");
assert(CB.getArgOperand(getArgNo()) == &getAssociatedValue() &&
assert(cast<CallBase>(*AnchorVal).getArgOperand(getArgNo()) ==
&getAssociatedValue() &&
"Associated value mismatch!");
}
break;