We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6951d5d commit 1cf1dc3Copy full SHA for 1cf1dc3
llvm/include/llvm/IR/CFG.h
@@ -54,9 +54,10 @@ class PredIterator {
54
inline void advancePastNonTerminators() {
55
// Loop to ignore non-terminator uses (for example BlockAddresses).
56
while (!It.atEnd()) {
57
- if (auto *Inst = dyn_cast<Instruction>(*It))
58
- if (Inst->isTerminator())
59
- break;
+ if (auto *Inst = dyn_cast<Instruction>(*It)) {
+ assert(Inst->isTerminator() && "BasicBlock used in non-terminator");
+ break;
60
+ }
61
62
++It;
63
}
0 commit comments