mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Simplify LastLocalSymbolIndex computation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b665c2b05e
commit
48f886b9de
@ -976,15 +976,13 @@ void ELFObjectWriter::computeSymbolTable(
|
||||
(Data.getFlags() & ELF_STB_Weak)) &&
|
||||
"External symbol requires STB_GLOBAL or STB_WEAK flag");
|
||||
WriteSymbol(Writer, MSD, Layout);
|
||||
if (MCELF::GetBinding(Data) == ELF::STB_LOCAL)
|
||||
LastLocalSymbolIndex++;
|
||||
assert(MCELF::GetBinding(Data) != ELF::STB_LOCAL);
|
||||
}
|
||||
|
||||
for (ELFSymbolData &MSD : UndefinedSymbolData) {
|
||||
MCSymbolData &Data = MSD.Symbol->getData();
|
||||
WriteSymbol(Writer, MSD, Layout);
|
||||
if (MCELF::GetBinding(Data) == ELF::STB_LOCAL)
|
||||
LastLocalSymbolIndex++;
|
||||
assert(MCELF::GetBinding(Data) != ELF::STB_LOCAL);
|
||||
}
|
||||
|
||||
uint64_t SecEnd = OS.tell();
|
||||
|
Loading…
Reference in New Issue
Block a user