[ELF] Change vector<Symbol *> to SmallVector. NFC
authorFangrui Song <i@maskray.me>
Tue, 1 Feb 2022 08:16:42 +0000 (00:16 -0800)
committerFangrui Song <i@maskray.me>
Tue, 1 Feb 2022 08:16:42 +0000 (00:16 -0800)
lld/ELF/Driver.cpp

index a1daae6..716523c 100644 (file)
@@ -1719,7 +1719,7 @@ static void handleUndefinedGlob(StringRef arg) {
 
   // Calling sym->extract() in the loop is not safe because it may add new
   // symbols to the symbol table, invalidating the current iterator.
-  std::vector<Symbol *> syms;
+  SmallVector<Symbol *, 0> syms;
   for (Symbol *sym : symtab->symbols())
     if (!sym->isPlaceholder() && pat->match(sym->getName()))
       syms.push_back(sym);