This function is now equivalent to isDefined().
llvm-svn: 317449
return;
}
- if (!B.isInCurrentOutput())
+ if (!B.isDefined())
for (InputSectionBase *Sec : CNamedSections.lookup(B.getName()))
Fn(Sec, 0);
}
for (WrappedSymbol &W : WrappedSymbols) {
// First, make a copy of __real_sym.
Symbol *Real = nullptr;
- if (W.Real->isInCurrentOutput()) {
+ if (W.Real->isDefined()) {
Real = (Symbol *)make<SymbolUnion>();
memcpy(Real, W.Real, sizeof(SymbolUnion));
}
return S;
}
if (Binding != STB_WEAK) {
- if (!S->isInCurrentOutput())
+ if (!S->isDefined())
S->Binding = Binding;
if (auto *SS = dyn_cast<SharedSymbol>(S))
SS->getFile<ELFT>()->IsUsed = true;
StringRef Name) {
if (WasInserted)
return 1;
- if (!S->isInCurrentOutput())
+ if (!S->isDefined())
return 1;
if (int R = compareVersion(S, Name))
return R;
if (!DemangledSyms) {
DemangledSyms.emplace();
for (Symbol *Sym : SymVector) {
- if (!Sym->isInCurrentOutput())
+ if (!Sym->isDefined())
continue;
if (Optional<std::string> S = demangle(Sym->getName()))
(*DemangledSyms)[*S].push_back(Sym);
if (Ver.IsExternCpp)
return getDemangledSyms().lookup(Ver.Name);
if (Symbol *B = find(Ver.Name))
- if (B->isInCurrentOutput())
+ if (B->isDefined())
return {B};
return {};
}
}
for (Symbol *Sym : SymVector)
- if (Sym->isInCurrentOutput() && M.match(Sym->getName()))
+ if (Sym->isDefined() && M.match(Sym->getName()))
Res.push_back(Sym);
return Res;
}
Name = {S.data(), Pos};
// If this is not in this DSO, it is not a definition.
- if (!isInCurrentOutput())
+ if (!isDefined())
return;
// '@@' in a symbol name means the default version.
return Binding;
if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED)
return STB_LOCAL;
- if (VersionId == VER_NDX_LOCAL && isInCurrentOutput())
+ if (VersionId == VER_NDX_LOCAL && isDefined())
return STB_LOCAL;
if (Config->NoGnuUnique && Binding == STB_GNU_UNIQUE)
return STB_GLOBAL;
return false;
if (computeBinding() == STB_LOCAL)
return false;
- if (!isInCurrentOutput())
+ if (!isDefined())
return true;
return ExportDynamic;
}
return SymbolKind == LazyArchiveKind || SymbolKind == LazyObjectKind;
}
- bool isInCurrentOutput() const { return isDefined(); }
-
// True is this is an undefined weak symbol. This only works once
// all input files have been added.
bool isUndefWeak() const;
}
if (Symbol *B = Symtab->find(Config->Init))
- if (B->isInCurrentOutput())
+ if (B->isDefined())
add({DT_INIT, B});
if (Symbol *B = Symtab->find(Config->Fini))
- if (B->isInCurrentOutput())
+ if (B->isDefined())
add({DT_FINI, B});
bool HasVerNeed = In<ELFT>::VerNeed->getNeedNum() != 0;
// linker has to look them up, so they have to be in the hash table.
if (auto *SS = dyn_cast<SharedSymbol>(S.Sym))
return SS->CopyRelSec == nullptr && !SS->NeedsPltAddr;
- return !S.Sym->isInCurrentOutput();
+ return !S.Sym->isDefined();
});
if (Mid == V.end())
return;
uint64_t Val, uint8_t StOther = STV_HIDDEN,
uint8_t Binding = STB_GLOBAL) {
Symbol *S = Symtab->find(Name);
- if (!S || S->isInCurrentOutput())
+ if (!S || S->isDefined())
return nullptr;
Symbol *Sym = Symtab->addRegular<ELFT>(Name, StOther, STT_NOTYPE, Val,
/*Size=*/0, Binding, Sec,
// At this point copy relocations have not been created yet, so any
// symbol that is not defined locally is preemptible.
- if (!B.isInCurrentOutput())
+ if (!B.isDefined())
return true;
// If we have a dynamic list it specifies which local symbols are preemptible.