================ @@ -2763,9 +2764,10 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(GlobalDecl GD, Attrs.addAttribute("fmv-features"); AddedAttr = true; } else if (!Feats.empty()) { - llvm::sort(Feats); + // Sort features and remove duplicates. + std::set<StringRef> OrderedFeats(Feats.begin(), Feats.end()); ---------------- labrinea wrote:
Isn't ordered. We need to avoid duplicates and also keep it ordered. Not that it really matters I guess if the metadata strings aren't ordered; just for uniformity with target-features. https://github.com/llvm/llvm-project/pull/122192 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits