mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Start catching LLVMContext misuse in the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ce2c51b670
commit
e3ab75d886
@ -1475,6 +1475,9 @@ void Verifier::visitInstruction(Instruction &I) {
|
|||||||
void Verifier::VerifyType(const Type *Ty) {
|
void Verifier::VerifyType(const Type *Ty) {
|
||||||
if (!Types.insert(Ty)) return;
|
if (!Types.insert(Ty)) return;
|
||||||
|
|
||||||
|
Assert1(&Mod->getContext() == &Ty->getContext(),
|
||||||
|
"Type context does not match Module context!", Ty);
|
||||||
|
|
||||||
switch (Ty->getTypeID()) {
|
switch (Ty->getTypeID()) {
|
||||||
case Type::FunctionTyID: {
|
case Type::FunctionTyID: {
|
||||||
const FunctionType *FTy = cast<FunctionType>(Ty);
|
const FunctionType *FTy = cast<FunctionType>(Ty);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user