[NFC] Code cleanup in TargetInfo.cpp
authorShengchen Kan <shengchen.kan@intel.com>
Wed, 13 May 2020 06:44:54 +0000 (14:44 +0800)
committerShengchen Kan <shengchen.kan@intel.com>
Wed, 13 May 2020 06:48:46 +0000 (14:48 +0800)
Fix the signed/unsigned mismatch issue

clang/lib/CodeGen/TargetInfo.cpp

index bc5c168..44608ea 100644 (file)
@@ -6675,9 +6675,9 @@ bool NVPTXABIInfo::isUnsupportedType(QualType T) const {
     return true;
   if (const auto *EIT = T->getAs<ExtIntType>())
     return EIT->getNumBits() >
-           (Context.getTargetInfo().hasInt128Type() ? 128 : 64);
+           (Context.getTargetInfo().hasInt128Type() ? 128U : 64U);
   if (!Context.getTargetInfo().hasInt128Type() && T->isIntegerType() &&
-      Context.getTypeSize(T) > 64)
+      Context.getTypeSize(T) > 64U)
     return true;
   if (const auto *AT = T->getAsArrayTypeUnsafe())
     return isUnsupportedType(AT->getElementType());