diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-03-20 11:40:34 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-05-14 11:43:05 +0000 |
commit | 349cc55c9796c4596a5b9904cd3281af295f878f (patch) | |
tree | 410c5a785075730a35f1272ca6a7adf72222ad03 /contrib/llvm-project/clang/lib/Basic/Module.cpp | |
parent | cb2ae6163174b90e999326ecec3699ee093a5d43 (diff) | |
parent | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (diff) |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Basic/Module.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Basic/Module.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/llvm-project/clang/lib/Basic/Module.cpp b/contrib/llvm-project/clang/lib/Basic/Module.cpp index b6cf1624ef01..09bd3251fea0 100644 --- a/contrib/llvm-project/clang/lib/Basic/Module.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Module.cpp @@ -121,9 +121,7 @@ static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, .Default(Target.hasFeature(Feature) || isPlatformEnvironment(Target, Feature)); if (!HasFeature) - HasFeature = std::find(LangOpts.ModuleFeatures.begin(), - LangOpts.ModuleFeatures.end(), - Feature) != LangOpts.ModuleFeatures.end(); + HasFeature = llvm::is_contained(LangOpts.ModuleFeatures, Feature); return HasFeature; } @@ -203,7 +201,7 @@ static void printModuleId(raw_ostream &OS, InputIter Begin, InputIter End, OS << "."; StringRef Name = getModuleNameFromComponent(*It); - if (!AllowStringLiterals || isValidIdentifier(Name)) + if (!AllowStringLiterals || isValidAsciiIdentifier(Name)) OS << Name; else { OS << '"'; |