[llvm-commits] [llvm] r89646 - /llvm/trunk/lib/VMCore/Verifier.cpp
Nick Lewycky
nicholas at mxc.ca
Sun Nov 22 20:52:01 PST 2009
Author: nicholas
Date: Sun Nov 22 22:52:00 2009
New Revision: 89646
URL: http://llvm.org/viewvc/llvm-project?rev=89646&view=rev
Log:
Start catching LLVMContext misuse in the verifier.
Modified:
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=89646&r1=89645&r2=89646&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Sun Nov 22 22:52:00 2009
@@ -1475,6 +1475,9 @@
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);
More information about the llvm-commits
mailing list