[lld] ed67d5a - [ELF] Switch cNamedSections to SmallVector. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 16:08:31 PST 2021


Author: Fangrui Song
Date: 2021-12-30T16:08:26-08:00
New Revision: ed67d5a03aafcb867e1cee50438d88989fcf7f57

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

LOG: [ELF] Switch cNamedSections to SmallVector. NFC

Make it smaller

Added: 
    

Modified: 
    lld/ELF/MarkLive.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp
index d2622e95e1e82..4d3d79d4ee80b 100644
--- a/lld/ELF/MarkLive.cpp
+++ b/lld/ELF/MarkLive.cpp
@@ -68,8 +68,8 @@ template <class ELFT> class MarkLive {
   SmallVector<InputSection *, 0> queue;
 
   // There are normally few input sections whose names are valid C
-  // identifiers, so we just store a std::vector instead of a multimap.
-  DenseMap<StringRef, std::vector<InputSectionBase *>> cNamedSections;
+  // identifiers, so we just store a SmallVector instead of a multimap.
+  DenseMap<StringRef, SmallVector<InputSectionBase *, 0>> cNamedSections;
 };
 } // namespace
 


        


More information about the llvm-commits mailing list