[PATCH] D127707: [Clang] Simplify unifying target features

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 14 10:02:43 PDT 2022


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:153
+    if (UsedFeatures.insert(Feature.drop_front()).second)
+      UnifiedFeatures.push_back(Feature);
   }
----------------
Nit: You could use `UnifiedFeatures.insert(UnifiedFeatures.begin(), Feature)` and that would make the following std::reverse unnecessary.  Up to you.
The code is not performance critical, so we don't care that we have to copy the elements.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127707/new/

https://reviews.llvm.org/D127707



More information about the cfe-commits mailing list