forked from OSchip/llvm-project
ELF2: Make member variable names shorter.
I'm going to use them in other patches, and the names feel too long despite their narrow scope. llvm-svn: 249642
This commit is contained in:
parent
e87aeb378d
commit
833ce281db
|
@ -90,8 +90,7 @@ void SymbolTable::addUndefinedSym(StringRef Name) {
|
|||
}
|
||||
|
||||
template <class ELFT> void SymbolTable::addUndefinedSym(StringRef Name) {
|
||||
resolve<ELFT>(new (Alloc)
|
||||
Undefined<ELFT>(Name, Undefined<ELFT>::SyntheticOptional));
|
||||
resolve<ELFT>(new (Alloc) Undefined<ELFT>(Name, Undefined<ELFT>::Optional));
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
|
@ -119,7 +118,7 @@ template <class ELFT> void SymbolTable::init(uint16_t EMachine) {
|
|||
return;
|
||||
EntrySym = new (Alloc) Undefined<ELFT>(
|
||||
Config->Entry.empty() ? Target->getDefaultEntry() : Config->Entry,
|
||||
Undefined<ELFT>::SyntheticRequired);
|
||||
Undefined<ELFT>::Required);
|
||||
resolve<ELFT>(EntrySym);
|
||||
|
||||
// In the assembly for 32 bit x86 the _GLOBAL_OFFSET_TABLE_ symbol is magical
|
||||
|
|
|
@ -87,10 +87,10 @@ std::unique_ptr<InputFile> Lazy::getMember() {
|
|||
}
|
||||
|
||||
void lld::elf2::initSymbols() {
|
||||
Undefined<ELF32LE>::SyntheticOptional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF32BE>::SyntheticOptional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF64LE>::SyntheticOptional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF64BE>::SyntheticOptional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF32LE>::Optional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF32BE>::Optional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF64LE>::Optional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF64BE>::Optional.setVisibility(STV_HIDDEN);
|
||||
}
|
||||
|
||||
template int SymbolBody::compare<ELF32LE>(SymbolBody *Other);
|
||||
|
|
|
@ -238,8 +238,8 @@ template <class ELFT> class Undefined : public ELFSymbolBody<ELFT> {
|
|||
typedef typename Base::Elf_Sym Elf_Sym;
|
||||
|
||||
public:
|
||||
static Elf_Sym SyntheticRequired;
|
||||
static Elf_Sym SyntheticOptional;
|
||||
static Elf_Sym Required;
|
||||
static Elf_Sym Optional;
|
||||
|
||||
Undefined(StringRef N, const Elf_Sym &Sym)
|
||||
: ELFSymbolBody<ELFT>(Base::UndefinedKind, N, Sym) {}
|
||||
|
@ -248,13 +248,13 @@ public:
|
|||
return S->kind() == Base::UndefinedKind;
|
||||
}
|
||||
|
||||
bool canKeepUndefined() const { return &this->Sym == &SyntheticOptional; }
|
||||
bool canKeepUndefined() const { return &this->Sym == &Optional; }
|
||||
};
|
||||
|
||||
template <class ELFT>
|
||||
typename Undefined<ELFT>::Elf_Sym Undefined<ELFT>::SyntheticRequired;
|
||||
typename Undefined<ELFT>::Elf_Sym Undefined<ELFT>::Required;
|
||||
template <class ELFT>
|
||||
typename Undefined<ELFT>::Elf_Sym Undefined<ELFT>::SyntheticOptional;
|
||||
typename Undefined<ELFT>::Elf_Sym Undefined<ELFT>::Optional;
|
||||
|
||||
template <class ELFT> class SharedSymbol : public Defined<ELFT> {
|
||||
typedef Defined<ELFT> Base;
|
||||
|
|
Loading…
Reference in New Issue