From: Saleem Abdulrasool Date: Thu, 10 Apr 2014 02:48:10 +0000 (+0000) Subject: ARM64: add an explicit cast to silence a silly warning X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6c66c4d2ebb32768a7f11d9e792083856e4d58bb;p=oota-llvm.git ARM64: add an explicit cast to silence a silly warning GCC 4.8 complains with: warning: enumeral and non-enumeral type in conditional expression Although this is silly and harmless in this case, add an explicit cast to silence the warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205949 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM64/ARM64TargetTransformInfo.cpp b/lib/Target/ARM64/ARM64TargetTransformInfo.cpp index 5323b8965f4..f12d1be81a1 100644 --- a/lib/Target/ARM64/ARM64TargetTransformInfo.cpp +++ b/lib/Target/ARM64/ARM64TargetTransformInfo.cpp @@ -227,7 +227,8 @@ unsigned ARM64TTI::getIntImmCost(unsigned Opcode, unsigned Idx, if (Idx == ImmIdx) { unsigned NumConstants = (BitSize + 63) / 64; unsigned Cost = ARM64TTI::getIntImmCost(Imm, Ty); - return (Cost <= NumConstants * TCC_Basic) ? TCC_Free : Cost; + return (Cost <= NumConstants * TCC_Basic) + ? static_cast(TCC_Free) : Cost; } return ARM64TTI::getIntImmCost(Imm, Ty); } @@ -252,7 +253,8 @@ unsigned ARM64TTI::getIntImmCost(Intrinsic::ID IID, unsigned Idx, if (Idx == 1) { unsigned NumConstants = (BitSize + 63) / 64; unsigned Cost = ARM64TTI::getIntImmCost(Imm, Ty); - return (Cost <= NumConstants * TCC_Basic) ? TCC_Free : Cost; + return (Cost <= NumConstants * TCC_Basic) + ? static_cast(TCC_Free) : Cost; } break; case Intrinsic::experimental_stackmap: