[PATCH] D142905: Change multilib selection algorithm
Peter Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 6 09:44:05 PST 2023
peter.smith added a comment.
A couple of small stylisitic suggestions.
================
Comment at: clang/include/clang/Driver/Multilib.h:31
public:
- using flags_list = std::vector<std::string>;
+ using flags_list = std::set<std::string>;
+ using arg_list = std::vector<std::string>;
----------------
would flags_set be a better name. I'm guessing we're using set as we want uniqueness and ordering?
If we don't need ordering then we may be able to use https://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringset-h
================
Comment at: clang/include/clang/Driver/Multilib.h:106
+ /// Select compatible variants
+ std::vector<Multilib> select(const Multilib::flags_list &Flags) const;
+
----------------
Worth using multilib_list for consistency with the rest of the file?
Is this meant to be an overload for bool select below? I mention it as it has a different return type. Perhaps use selectCompatible?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142905/new/
https://reviews.llvm.org/D142905
More information about the cfe-commits
mailing list