projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7caebff
)
Verify that machine instruction parent pointers are consistent.
author
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Wed, 12 Jan 2011 21:27:41 +0000
(21:27 +0000)
committer
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Wed, 12 Jan 2011 21:27:41 +0000
(21:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123322
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/MachineVerifier.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/MachineVerifier.cpp
b/lib/CodeGen/MachineVerifier.cpp
index 83c980d51f0de0b06f5d6178f24fd11a2abc184d..cceb4b6b7309575597b8034cf63579ed71280b13 100644
(file)
--- a/
lib/CodeGen/MachineVerifier.cpp
+++ b/
lib/CodeGen/MachineVerifier.cpp
@@
-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);