summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-05-03 21:01:33 +0000
committerCraig Topper <craig.topper@intel.com>2018-05-03 21:01:33 +0000
commit274506dab8bc7b754e750bc8a668c2b348aa5737 (patch)
treee9b4ca7c76af9ee8730456c2865f5db0f0fe0d4e /clang/lib/CodeGen/CodeGenFunction.cpp
parent85cc298c1a67cdff22ece17ce1f352b7a56a8b8a (diff)
downloadbcm5719-llvm-274506dab8bc7b754e750bc8a668c2b348aa5737.tar.gz
bcm5719-llvm-274506dab8bc7b754e750bc8a668c2b348aa5737.zip
[CodeGenFunction] Use the StringRef::split function that takes a char separator instead of StringRef separator. NFC
The char separator version should be a little better optimized. llvm-svn: 331482
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index bf5312550b7..6c73a8cebdc 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -2284,7 +2284,7 @@ static bool hasRequiredFeatures(const SmallVectorImpl<StringRef> &ReqFeatures,
return std::all_of(
ReqFeatures.begin(), ReqFeatures.end(), [&](StringRef Feature) {
SmallVector<StringRef, 1> OrFeatures;
- Feature.split(OrFeatures, "|");
+ Feature.split(OrFeatures, '|');
return std::any_of(OrFeatures.begin(), OrFeatures.end(),
[&](StringRef Feature) {
if (!CallerFeatureMap.lookup(Feature)) {
@@ -2322,7 +2322,7 @@ void CodeGenFunction::checkTargetFeatures(const CallExpr *E,
// Return if the builtin doesn't have any required features.
if (!FeatureList || StringRef(FeatureList) == "")
return;
- StringRef(FeatureList).split(ReqFeatures, ",");
+ StringRef(FeatureList).split(ReqFeatures, ',');
if (!hasRequiredFeatures(ReqFeatures, CGM, FD, MissingFeature))
CGM.getDiags().Report(E->getLocStart(), diag::err_builtin_needs_feature)
<< TargetDecl->getDeclName()
OpenPOWER on IntegriCloud