summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets/PPC.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-03-31 08:48:19 +0000
committerFangrui Song <maskray@google.com>2019-03-31 08:48:19 +0000
commit75e74e077c9fed24c00fb5e12078df2b192841da (patch)
treef3d417ebdba005b4b25dbfc350ab4159662a3418 /clang/lib/Basic/Targets/PPC.cpp
parenteaf4484e94e7de38ef9d80cb80d92b26ef5f657e (diff)
downloadbcm5719-llvm-75e74e077c9fed24c00fb5e12078df2b192841da.tar.gz
bcm5719-llvm-75e74e077c9fed24c00fb5e12078df2b192841da.zip
Range-style std::find{,_if} -> llvm::find{,_if}. NFC
llvm-svn: 357359
Diffstat (limited to 'clang/lib/Basic/Targets/PPC.cpp')
-rw-r--r--clang/lib/Basic/Targets/PPC.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp
index 0f99f81352c..14a9ffd09a6 100644
--- a/clang/lib/Basic/Targets/PPC.cpp
+++ b/clang/lib/Basic/Targets/PPC.cpp
@@ -214,31 +214,26 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
static bool ppcUserFeaturesCheck(DiagnosticsEngine &Diags,
const std::vector<std::string> &FeaturesVec) {
- if (std::find(FeaturesVec.begin(), FeaturesVec.end(), "-vsx") !=
- FeaturesVec.end()) {
- if (std::find(FeaturesVec.begin(), FeaturesVec.end(), "+power8-vector") !=
- FeaturesVec.end()) {
+ if (llvm::find(FeaturesVec, "-vsx") != FeaturesVec.end()) {
+ if (llvm::find(FeaturesVec, "+power8-vector") != FeaturesVec.end()) {
Diags.Report(diag::err_opt_not_valid_with_opt) << "-mpower8-vector"
<< "-mno-vsx";
return false;
}
- if (std::find(FeaturesVec.begin(), FeaturesVec.end(), "+direct-move") !=
- FeaturesVec.end()) {
+ if (llvm::find(FeaturesVec, "+direct-move") != FeaturesVec.end()) {
Diags.Report(diag::err_opt_not_valid_with_opt) << "-mdirect-move"
<< "-mno-vsx";
return false;
}
- if (std::find(FeaturesVec.begin(), FeaturesVec.end(), "+float128") !=
- FeaturesVec.end()) {
+ if (llvm::find(FeaturesVec, "+float128") != FeaturesVec.end()) {
Diags.Report(diag::err_opt_not_valid_with_opt) << "-mfloat128"
<< "-mno-vsx";
return false;
}
- if (std::find(FeaturesVec.begin(), FeaturesVec.end(), "+power9-vector") !=
- FeaturesVec.end()) {
+ if (llvm::find(FeaturesVec, "+power9-vector") != FeaturesVec.end()) {
Diags.Report(diag::err_opt_not_valid_with_opt) << "-mpower9-vector"
<< "-mno-vsx";
return false;
@@ -311,8 +306,7 @@ bool PPCTargetInfo::initFeatureMap(
return false;
if (!(ArchDefs & ArchDefinePwr9) && (ArchDefs & ArchDefinePpcgr) &&
- std::find(FeaturesVec.begin(), FeaturesVec.end(), "+float128") !=
- FeaturesVec.end()) {
+ llvm::find(FeaturesVec, "+float128") != FeaturesVec.end()) {
// We have __float128 on PPC but not power 9 and above.
Diags.Report(diag::err_opt_not_valid_with_opt) << "-mfloat128" << CPU;
return false;
OpenPOWER on IntegriCloud