mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 18:31:04 +00:00
Verify that machine instruction parent pointers are consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123322 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7caebff83d
commit
7bd46dae9c
@ -273,6 +273,11 @@ bool MachineVerifier::runOnMachineFunction(MachineFunction &MF) {
|
||||
visitMachineBasicBlockBefore(MFI);
|
||||
for (MachineBasicBlock::const_iterator MBBI = MFI->begin(),
|
||||
MBBE = MFI->end(); MBBI != MBBE; ++MBBI) {
|
||||
if (MBBI->getParent() != MFI) {
|
||||
report("Bad instruction parent pointer", MFI);
|
||||
*OS << "Instruction: " << *MBBI;
|
||||
continue;
|
||||
}
|
||||
visitMachineInstrBefore(MBBI);
|
||||
for (unsigned I = 0, E = MBBI->getNumOperands(); I != E; ++I)
|
||||
visitMachineOperand(&MBBI->getOperand(I), I);
|
||||
|
Loading…
Reference in New Issue
Block a user