diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-10-24 23:15:31 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-10-24 23:15:31 +0000 |
commit | a9195877a57eda4b755b1de463de794186c23ca8 (patch) | |
tree | c6395056f3a9c350c6e13082776d50d9ced435c8 /clang/lib/Basic/Targets.cpp | |
parent | 84921b9860adbc7cd40df8beb9caf542ddaaa51b (diff) | |
download | bcm5719-llvm-a9195877a57eda4b755b1de463de794186c23ca8.tar.gz bcm5719-llvm-a9195877a57eda4b755b1de463de794186c23ca8.zip |
Simplify boolean conditional return statements in lib/Basic.
Patch by Richard.
llvm-svn: 251214
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index a0fe52990f6..0094ce8cc5c 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -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; |