mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Verifier: Check that all instructions have their parent pointers set up
correctly. This helps with catching problems caused by IRBuilder abuse such as the one fixed in CFE r222487. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222488 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9c390888f7
commit
c8ef21f1b1
@ -1176,6 +1176,10 @@ void Verifier::visitBasicBlock(BasicBlock &BB) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that all instructions have their parent pointers set up correctly.
|
||||||
|
for (auto &I: BB)
|
||||||
|
Assert(I.getParent() == &BB, "Instruction has bogus parent pointer!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Verifier::visitTerminatorInst(TerminatorInst &I) {
|
void Verifier::visitTerminatorInst(TerminatorInst &I) {
|
||||||
|
Loading…
Reference in New Issue
Block a user