[PATCH] D27716: [ELF] - Implemented --retain-symbols-file option

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 09:32:56 PST 2016

ruiu added inline comments.

Comment at: ELF/Config.h:76
   uint8_t OSABI = 0;
+  llvm::DenseSet<llvm::CachedHashStringRef> RetainSymbolsFile;
   llvm::DenseMap<llvm::CachedHashStringRef, unsigned> SymbolOrderingFile;
Using CachedHashStringRef doesn't make sense here. You still compute string hash values before looking up strings, so it doesn't really cache anything (unless you have a gigantic --retain-symbols-file which is unrealistic). Just use a string set.

Comment at: ELF/Driver.cpp:648
+  // If --retain-symbols-file used it retains only the symbols listed in the
+  // file filename, discarding all others.
If --retain-symbol-file is used, we'll retail only the symbols listed in the file and discard all others.


More information about the llvm-commits mailing list