1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

Start catching LLVMContext misuse in the verifier.

llvm-svn: 89646
This commit is contained in:
Nick Lewycky 2009-11-23 04:52:00 +00:00
parent b3bedf4b2d
commit deb3d7dfbc

View File

@ -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);