diff options
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 3741e5d..1b02d11 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -1223,6 +1223,7 @@ void Verifier::visitDIDerivedType(const DIDerivedType &N) { N.getTag() == dwarf::DW_TAG_volatile_type || N.getTag() == dwarf::DW_TAG_restrict_type || N.getTag() == dwarf::DW_TAG_atomic_type || + N.getTag() == dwarf::DW_TAG_LLVM_ptrauth_type || N.getTag() == dwarf::DW_TAG_member || (N.getTag() == dwarf::DW_TAG_variable && N.isStaticMember()) || N.getTag() == dwarf::DW_TAG_inheritance || @@ -5002,7 +5003,9 @@ void Verifier::visitInstruction(Instruction &I) { } else if (GlobalValue *GV = dyn_cast<GlobalValue>(I.getOperand(i))) { Check(GV->getParent() == &M, "Referencing global in another module!", &I, &M, GV, GV->getParent()); - } else if (isa<Instruction>(I.getOperand(i))) { + } else if (Instruction *OpInst = dyn_cast<Instruction>(I.getOperand(i))) { + Check(OpInst->getFunction() == BB->getParent(), + "Referring to an instruction in another function!", &I); verifyDominatesUse(I, i); } else if (isa<InlineAsm>(I.getOperand(i))) { Check(CBI && &CBI->getCalledOperandUse() == &I.getOperandUse(i), |