[PATCH] D46341: [llvm-objcopy] Add --discard-all (-x) option
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 1 16:54:48 PDT 2018
alexshap added inline comments.
================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:343
+
+ Obj.SymbolTable->removeSymbols([&](Symbol &Sym) {
+ if (Config.DiscardAll && Sym.Binding == STB_LOCAL &&
----------------
const Symbol &Sym
================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:344
+ Obj.SymbolTable->removeSymbols([&](Symbol &Sym) {
+ if (Config.DiscardAll && Sym.Binding == STB_LOCAL &&
+ Sym.getShndx() != SHN_UNDEF && Sym.Type != STT_FILE &&
----------------
return Config.DiscardAll && Sym.Binding == STB_LOCAL &&
Sym.getShndx() != SHN_UNDEF && Sym.Type != STT_FILE &&
Sym.Type != STT_SECTION
Repository:
rL LLVM
https://reviews.llvm.org/D46341
More information about the llvm-commits
mailing list