mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Hide SymbolBody::IsLocal.
IsLocal member is initialized by the constructor and will never change. So we don't want to make it directly accessible. llvm-svn: 315667
This commit is contained in:
@@ -121,7 +121,7 @@ static uint64_t getSymVA(const SymbolBody &Body, int64_t &Addend) {
|
||||
|
||||
SymbolBody::SymbolBody(Kind K, StringRefZ Name, bool IsLocal, uint8_t StOther,
|
||||
uint8_t Type)
|
||||
: SymbolKind(K), NeedsPltAddr(false), IsLocal(IsLocal),
|
||||
: SymbolKind(K), IsLocal(IsLocal), NeedsPltAddr(false),
|
||||
IsInGlobalMipsGot(false), Is32BitMipsGot(false), IsInIplt(false),
|
||||
IsInIgot(false), IsPreemptible(false), Type(Type), StOther(StOther),
|
||||
Name(Name) {}
|
||||
|
||||
@@ -108,14 +108,13 @@ protected:
|
||||
|
||||
const unsigned SymbolKind : 8;
|
||||
|
||||
// True if this is a local symbol.
|
||||
unsigned IsLocal : 1;
|
||||
|
||||
public:
|
||||
// True the symbol should point to its PLT entry.
|
||||
// For SharedSymbol only.
|
||||
unsigned NeedsPltAddr : 1;
|
||||
|
||||
// True if this is a local symbol.
|
||||
unsigned IsLocal : 1;
|
||||
|
||||
// True if this symbol has an entry in the global part of MIPS GOT.
|
||||
unsigned IsInGlobalMipsGot : 1;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ template <class ELFT> void elf::createCommonSections() {
|
||||
// Replace all DefinedCommon symbols with DefinedRegular symbols so that we
|
||||
// don't have to care about DefinedCommon symbols beyond this point.
|
||||
replaceBody<DefinedRegular>(S, Sym->getFile(), Sym->getName(),
|
||||
static_cast<bool>(Sym->IsLocal), Sym->StOther,
|
||||
static_cast<bool>(Sym->isLocal()), Sym->StOther,
|
||||
Sym->Type, 0, Sym->getSize<ELFT>(), Section);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ template <class ELFT> void Writer<ELFT>::copyLocalSymbols() {
|
||||
for (InputFile *File : ObjectFiles) {
|
||||
ObjFile<ELFT> *F = cast<ObjFile<ELFT>>(File);
|
||||
for (SymbolBody *B : F->getLocalSymbols()) {
|
||||
if (!B->IsLocal)
|
||||
if (!B->isLocal())
|
||||
fatal(toString(F) +
|
||||
": broken object: getLocalSymbols returns a non-local symbol");
|
||||
auto *DR = dyn_cast<DefinedRegular>(B);
|
||||
|
||||
Reference in New Issue
Block a user