[PATCH] D10011: Refactor: Simplify boolean conditional return statements in lib/Basic
Richard via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 24 12:13:43 PDT 2015
LegalizeAdulthood updated this revision to Diff 38318.
LegalizeAdulthood added a comment.
Update to latest.
I do not have commit access.
http://reviews.llvm.org/D10011
Files:
lib/Basic/Targets.cpp
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -2704,22 +2704,22 @@
// 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;
// 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10011.38318.patch
Type: text/x-patch
Size: 1232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151024/5ecb71b5/attachment.bin>
More information about the cfe-commits
mailing list