[llvm-objcopy] Use SmallVector to make some structs smaller. NFC
diff --git a/llvm/include/llvm/ObjCopy/CommonConfig.h b/llvm/include/llvm/ObjCopy/CommonConfig.h
index 3833959..3f894b0 100644
--- a/llvm/include/llvm/ObjCopy/CommonConfig.h
+++ b/llvm/include/llvm/ObjCopy/CommonConfig.h
@@ -22,7 +22,6 @@
 // Necessary for llvm::DebugCompressionType::None
 #include "llvm/Target/TargetOptions.h"
 #include <optional>
-#include <vector>
 
 namespace llvm {
 namespace objcopy {
@@ -126,8 +125,8 @@
 // provided for that option.
 class NameMatcher {
   DenseSet<CachedHashStringRef> PosNames;
-  std::vector<NameOrPattern> PosPatterns;
-  std::vector<NameOrPattern> NegMatchers;
+  SmallVector<NameOrPattern, 0> PosPatterns;
+  SmallVector<NameOrPattern, 0> NegMatchers;
 
 public:
   Error addMatcher(Expected<NameOrPattern> Matcher) {
@@ -179,8 +178,8 @@
   StringRef SymbolName;
   StringRef SectionName;
   uint64_t Value = 0;
-  std::vector<SymbolFlag> Flags;
-  std::vector<StringRef> BeforeSyms;
+  SmallVector<SymbolFlag, 0> Flags;
+  SmallVector<StringRef, 0> BeforeSyms;
 };
 
 // Specify section name and section body for newly added or updated section.
@@ -218,9 +217,9 @@
   DiscardType DiscardMode = DiscardType::None;
 
   // Repeated options
-  std::vector<NewSectionInfo> AddSection;
-  std::vector<StringRef> DumpSection;
-  std::vector<NewSectionInfo> UpdateSection;
+  SmallVector<NewSectionInfo, 0> AddSection;
+  SmallVector<StringRef, 0> DumpSection;
+  SmallVector<NewSectionInfo, 0> UpdateSection;
 
   // Section matchers
   NameMatcher KeepSection;
@@ -244,7 +243,7 @@
   StringMap<StringRef> SymbolsToRename;
 
   // Symbol info specified by --add-symbol option.
-  std::vector<NewSymbolInfo> SymbolsToAdd;
+  SmallVector<NewSymbolInfo, 0> SymbolsToAdd;
 
   // Boolean options
   bool DeterministicArchives = true;
diff --git a/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp b/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
index 6318578..c5c7cc2 100644
--- a/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
+++ b/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
@@ -528,7 +528,7 @@
 // ArgValue, loads data from the file, and stores section name and data
 // into the vector of new sections \p NewSections.
 static Error loadNewSectionData(StringRef ArgValue, StringRef OptionName,
-                                std::vector<NewSectionInfo> &NewSections) {
+                                SmallVector<NewSectionInfo, 0> &NewSections) {
   if (!ArgValue.contains('='))
     return createStringError(errc::invalid_argument,
                              "bad format for " + OptionName + ": missing '='");