OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce2c51b
)
Start catching LLVMContext misuse in the verifier.
author
Nick Lewycky
<nicholas@mxc.ca>
Mon, 23 Nov 2009 04:52:00 +0000
(
04:52
+0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Mon, 23 Nov 2009 04:52:00 +0000
(
04:52
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89646
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Verifier.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Verifier.cpp
b/lib/VMCore/Verifier.cpp
index
7ab7b15
..
7aa86b7
100644
(file)
--- a/
lib/VMCore/Verifier.cpp
+++ b/
lib/VMCore/Verifier.cpp
@@
-1475,6
+1475,9
@@
void Verifier::visitInstruction(Instruction &I) {
void Verifier::VerifyType(const Type *Ty) {
if (!Types.insert(Ty)) return;
+ Assert1(&Mod->getContext() == &Ty->getContext(),
+ "Type context does not match Module context!", Ty);
+
switch (Ty->getTypeID()) {
case Type::FunctionTyID: {
const FunctionType *FTy = cast<FunctionType>(Ty);