mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
Verify that machine instruction parent pointers are consistent.
llvm-svn: 123322
This commit is contained in:
parent
e82361731d
commit
764cce86f0
@ -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…
x
Reference in New Issue
Block a user