[clang] 6c39ab9 - [Driver] Use SmallVectorImpl reference instead of SmallVector reference in MultilibSet. NFC

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 22:26:06 PST 2023


Author: Craig Topper
Date: 2023-12-06T22:25:33-08:00
New Revision: 6c39ab90524ee791b0c6adaf8a305bf68ed4cd7f

URL: https://github.com/llvm/llvm-project/commit/6c39ab90524ee791b0c6adaf8a305bf68ed4cd7f
DIFF: https://github.com/llvm/llvm-project/commit/6c39ab90524ee791b0c6adaf8a305bf68ed4cd7f.diff

LOG: [Driver] Use SmallVectorImpl reference instead of SmallVector reference in MultilibSet. NFC

We prefer to pass SmallVectorImpl reference so that no specific
inline size is required.

Added: 
    

Modified: 
    clang/include/clang/Driver/Multilib.h
    clang/lib/Driver/Multilib.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/Multilib.h b/clang/include/clang/Driver/Multilib.h
index 6a9533e6dd831..9a2cc9bb1ba13 100644
--- a/clang/include/clang/Driver/Multilib.h
+++ b/clang/include/clang/Driver/Multilib.h
@@ -130,7 +130,7 @@ class MultilibSet {
 
   /// Select compatible variants, \returns false if none are compatible
   bool select(const Multilib::flags_list &Flags,
-              llvm::SmallVector<Multilib> &) const;
+              llvm::SmallVectorImpl<Multilib> &) const;
 
   unsigned size() const { return Multilibs.size(); }
 

diff  --git a/clang/lib/Driver/Multilib.cpp b/clang/lib/Driver/Multilib.cpp
index 7681c1a3ce675..9c091bbfdabab 100644
--- a/clang/lib/Driver/Multilib.cpp
+++ b/clang/lib/Driver/Multilib.cpp
@@ -95,7 +95,7 @@ MultilibSet &MultilibSet::FilterOut(FilterCallback F) {
 void MultilibSet::push_back(const Multilib &M) { Multilibs.push_back(M); }
 
 bool MultilibSet::select(const Multilib::flags_list &Flags,
-                         llvm::SmallVector<Multilib> &Selected) const {
+                         llvm::SmallVectorImpl<Multilib> &Selected) const {
   llvm::StringSet<> FlagSet(expandFlags(Flags));
   Selected.clear();
 


        


More information about the cfe-commits mailing list