Author: ctopper Date: Thu May 3 14:01:33 2018 New Revision: 331482 URL: http://llvm.org/viewvc/llvm-project?rev=331482&view=rev Log: [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. Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=331482&r1=331481&r2=331482&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original) +++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Thu May 3 14:01:33 2018 @@ -2284,7 +2284,7 @@ static bool hasRequiredFeatures(const Sm 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::checkTargetFeature // 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() _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits