[clang] [clang] deduplicate target-features for modules (PR #187614)
Florian Mayer via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 16:04:41 PDT 2026
================
@@ -495,7 +495,10 @@ static bool checkTargetOptions(const TargetOptions &TargetOpts,
SmallVector<StringRef, 4> ReadFeatures(TargetOpts.FeaturesAsWritten.begin(),
TargetOpts.FeaturesAsWritten.end());
llvm::sort(ExistingFeatures);
+ ExistingFeatures.erase(llvm::unique(ExistingFeatures),
+ ExistingFeatures.end());
llvm::sort(ReadFeatures);
+ ReadFeatures.erase(llvm::unique(ReadFeatures), ReadFeatures.end());
----------------
fmayer wrote:
See https://github.com/llvm/llvm-project/pull/187624#issuecomment-4138092824 for the reasoning I did it like this. I don't have strong feelings but wanted to do the minimal change here.
https://github.com/llvm/llvm-project/pull/187614
More information about the cfe-commits
mailing list