From 7708f5b68af5521412fee2f3f43795196b2fdb0e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 31 Jan 2015 17:56:11 +0000 Subject: [PATCH] X86: silence a GCC warning GCC 4.9 gives the following warning: warning: enumeral and non-enumeral type in conditional expression Cast the enumeral value to an integer within the ternary operation. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227692 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/Utils/X86ShuffleDecode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/X86/Utils/X86ShuffleDecode.cpp b/lib/Target/X86/Utils/X86ShuffleDecode.cpp index e71fda551a1..a7101e4febb 100644 --- a/lib/Target/X86/Utils/X86ShuffleDecode.cpp +++ b/lib/Target/X86/Utils/X86ShuffleDecode.cpp @@ -429,6 +429,6 @@ void DecodeScalarMoveMask(MVT VT, bool IsLoad, SmallVectorImpl &Mask) { unsigned NumElts = VT.getVectorNumElements(); Mask.push_back(NumElts); for (unsigned i = 1; i < NumElts; i++) - Mask.push_back(IsLoad ? SM_SentinelZero : i); + Mask.push_back(IsLoad ? static_cast(SM_SentinelZero) : i); } } // llvm namespace -- 2.34.1