mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-28 06:29:45 +00:00
Avoid "ambiguous 'else'" warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86314 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d0b704e3e
commit
9beab3fe6f
@ -213,11 +213,12 @@ static Constant *GetResultOfComparison(CmpInst::Predicate pred,
|
||||
return ConstantExpr::getCompare(pred, CLHS, CRHS);
|
||||
|
||||
if (LHS == RHS)
|
||||
if (isa<IntegerType>(LHS->getType()) || isa<PointerType>(LHS->getType()))
|
||||
if (isa<IntegerType>(LHS->getType()) || isa<PointerType>(LHS->getType())) {
|
||||
if (ICmpInst::isTrueWhenEqual(pred))
|
||||
return ConstantInt::getTrue(LHS->getContext());
|
||||
else
|
||||
return ConstantInt::getFalse(LHS->getContext());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user