]> granicus.if.org Git - clang/commitdiff
Simplify boolean conditional return statements in lib/Basic.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 24 Oct 2015 23:15:31 +0000 (23:15 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 24 Oct 2015 23:15:31 +0000 (23:15 +0000)
Patch by Richard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251214 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp

index a0fe52990f62bfb7668e15529d8823096d1347c3..0094ce8cc5c04595098e2d9ff15c9361f7d38395 100644 (file)
@@ -2704,14 +2704,14 @@ bool X86TargetInfo::initFeatureMap(
 
   // Enable popcnt if sse4.2 is enabled and popcnt is not explicitly disabled.
   auto I = Features.find("sse4.2");
-  if (I != Features.end() && I->getValue() == true &&
+  if (I != Features.end() && I->getValue() &&
       std::find(FeaturesVec.begin(), FeaturesVec.end(), "-popcnt") ==
           FeaturesVec.end())
     Features["popcnt"] = true;
 
   // Enable prfchw if 3DNow! is enabled and prfchw is not explicitly disabled.
   I = Features.find("3dnow");
-  if (I != Features.end() && I->getValue() == true &&
+  if (I != Features.end() && I->getValue() &&
       std::find(FeaturesVec.begin(), FeaturesVec.end(), "-prfchw") ==
           FeaturesVec.end())
     Features["prfchw"] = true;
@@ -2719,7 +2719,7 @@ bool X86TargetInfo::initFeatureMap(
   // Additionally, if SSE is enabled and mmx is not explicitly disabled,
   // then enable MMX.
   I = Features.find("sse");
-  if (I != Features.end() && I->getValue() == true &&
+  if (I != Features.end() && I->getValue() &&
       std::find(FeaturesVec.begin(), FeaturesVec.end(), "-mmx") ==
           FeaturesVec.end())
     Features["mmx"] = true;