projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88eec39
)
Verifier: Check that all instructions have their parent pointers set up
author
Adrian Prantl
<aprantl@apple.com>
Fri, 21 Nov 2014 00:39:43 +0000
(
00:39
+0000)
committer
Adrian Prantl
<aprantl@apple.com>
Fri, 21 Nov 2014 00:39:43 +0000
(
00:39
+0000)
correctly. This helps with catching problems caused by IRBuilder abuse
such as the one fixed in CFE r222487.
llvm-svn: 222488
llvm/lib/IR/Verifier.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/IR/Verifier.cpp
b/llvm/lib/IR/Verifier.cpp
index
d42ca31
..
0560015
100644
(file)
--- a/
llvm/lib/IR/Verifier.cpp
+++ b/
llvm/lib/IR/Verifier.cpp
@@
-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) {