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:
parent
b3bedf4b2d
commit
deb3d7dfbc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user