diff options
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r-- | lld/ELF/Writer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 1c1f02c22c0..11c15a3990f 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -240,7 +240,7 @@ static std::vector<DefinedCommon<ELFT> *> getCommonSymbols() { // The main function of the writer. template <class ELFT> void Writer<ELFT>::run() { - if (!Config->DiscardAll) + if (Config->Discard != DiscardPolicy::All) copyLocalSymbols(); addReservedSymbols(); @@ -329,7 +329,7 @@ static bool shouldKeepInSymtab(InputSectionBase<ELFT> *Sec, StringRef SymName, if (Sec == &InputSection<ELFT>::Discarded) return false; - if (Config->DiscardNone) + if (Config->Discard == DiscardPolicy::None) return true; // In ELF assembly .L symbols are normally discarded by the assembler. @@ -340,7 +340,7 @@ static bool shouldKeepInSymtab(InputSectionBase<ELFT> *Sec, StringRef SymName, if (!SymName.startswith(".L") && !SymName.empty()) return true; - if (Config->DiscardLocals) + if (Config->Discard == DiscardPolicy::Locals) return false; return !(Sec->getSectionHdr()->sh_flags & SHF_MERGE); |