mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2887,13 +2887,13 @@ bool LLParser::ParseCompare(Instruction *&Inst, PerFunctionState &PFS,
|
||||
if (Opc == Instruction::FCmp) {
|
||||
if (!LHS->getType()->isFPOrFPVector())
|
||||
return Error(Loc, "fcmp requires floating point operands");
|
||||
Inst = new FCmpInst(CmpInst::Predicate(Pred), LHS, RHS);
|
||||
Inst = new FCmpInst(Context, CmpInst::Predicate(Pred), LHS, RHS);
|
||||
} else {
|
||||
assert(Opc == Instruction::ICmp && "Unknown opcode for CmpInst!");
|
||||
if (!LHS->getType()->isIntOrIntVector() &&
|
||||
!isa<PointerType>(LHS->getType()))
|
||||
return Error(Loc, "icmp requires integer operands");
|
||||
Inst = new ICmpInst(CmpInst::Predicate(Pred), LHS, RHS);
|
||||
Inst = new ICmpInst(Context, CmpInst::Predicate(Pred), LHS, RHS);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user