diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2009-11-07 00:26:47 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-11-07 00:26:47 +0000 |
commit | 7f287f83693b6f419210d1a3560c45515b9e690c (patch) | |
tree | 16fbdfad44f9f5d51d65a611d7529098ad0ec4e1 /lib | |
parent | 955449e468395f33a2debd72e3e6f8f5a1dc1b46 (diff) | |
download | external_llvm-7f287f83693b6f419210d1a3560c45515b9e690c.zip external_llvm-7f287f83693b6f419210d1a3560c45515b9e690c.tar.gz external_llvm-7f287f83693b6f419210d1a3560c45515b9e690c.tar.bz2 |
Avoid "ambiguous 'else'" warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/JumpThreading.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index 4bbde13..7cd1602 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -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; } |