mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Fix some problems where the verifier would crash on invalid input instead of
reporting the problem and exiting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -592,6 +592,7 @@ void Verifier::visitInstruction(Instruction &I) {
|
||||
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
|
||||
// Check to make sure that the "address of" an intrinsic function is never
|
||||
// taken.
|
||||
Assert1(I.getOperand(i) != 0, "Instruction has null operand!", &I);
|
||||
if (Function *F = dyn_cast<Function>(I.getOperand(i))) {
|
||||
Assert1(!F->isIntrinsic() || (i == 0 && isa<CallInst>(I)),
|
||||
"Cannot take the address of an intrinsic!", &I);
|
||||
|
Reference in New Issue
Block a user