[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

Alexandros Lamprineas via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 10 09:08:19 PST 2025


================
@@ -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


More information about the cfe-commits mailing list