From 65e80b963a13af1d307dc64d18b385adb79a24ef Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 19 Jan 2016 21:19:52 +0000 Subject: [PATCH] Rename IgnoredWeak to Ignored. Thanks to Rui for the suggestion. llvm-svn: 258189 --- lld/ELF/SymbolTable.cpp | 2 +- lld/ELF/Symbols.cpp | 4 ++-- lld/ELF/Symbols.h | 9 ++++----- lld/ELF/Writer.cpp | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index a68469887a0c..d3413102b60d 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -120,7 +120,7 @@ SymbolBody *SymbolTable::addSynthetic(StringRef Name, // file's symbol table. Such symbols are useful for some linker-defined symbols. template SymbolBody *SymbolTable::addIgnored(StringRef Name) { - return addAbsolute(Name, ElfSym::IgnoredWeak); + return addAbsolute(Name, ElfSym::Ignored); } // Rename SYM as __wrap_SYM. The original symbol is preserved as __real_SYM. diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 40f8f0960da0..bc0db8aa575c 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -122,8 +122,8 @@ std::unique_ptr Lazy::getMember() { template static void doInitSymbols() { ElfSym::End.setBinding(STB_GLOBAL); - ElfSym::IgnoredWeak.setBinding(STB_WEAK); - ElfSym::IgnoredWeak.setVisibility(STV_HIDDEN); + ElfSym::Ignored.setBinding(STB_WEAK); + ElfSym::Ignored.setVisibility(STV_HIDDEN); } void elf2::initSymbols() { diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 28cdb28939cd..73b074ccd824 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -304,10 +304,9 @@ private: template struct ElfSym { typedef typename llvm::object::ELFFile::Elf_Sym Elf_Sym; - // Used to represent an undefined symbol which we don't want - // to add to the output file's symbol table. The `IgnoredWeak` - // has weak binding and can be substituted. - static Elf_Sym IgnoredWeak; + // Used to represent an undefined symbol which we don't want to add to the + // output file's symbol table. It has weak binding and can be substituted. + static Elf_Sym Ignored; // The content for _end and end symbols. static Elf_Sym End; @@ -321,7 +320,7 @@ template struct ElfSym { static Elf_Sym RelaIpltEnd; }; -template typename ElfSym::Elf_Sym ElfSym::IgnoredWeak; +template typename ElfSym::Elf_Sym ElfSym::Ignored; template typename ElfSym::Elf_Sym ElfSym::End; template typename ElfSym::Elf_Sym ElfSym::MipsGp; template diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 9a05fd2830f6..a8a5aca6b510 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -613,7 +613,7 @@ template static bool includeInSymtab(const SymbolBody &B) { // Don't include synthetic symbols like __init_array_start in every output. if (auto *U = dyn_cast>(&B)) - if (&U->Sym == &ElfSym::IgnoredWeak) + if (&U->Sym == &ElfSym::Ignored) return false; return true;