mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-02 10:33:53 +00:00
Avoid warnings when building without asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7978ab3ad9
commit
f3344cdffb
@ -961,19 +961,14 @@ void ELFObjectWriter::computeSymbolTable(
|
||||
for (ELFSymbolData &MSD : ExternalSymbolData) {
|
||||
MSD.StringIndex = StrTabBuilder.getOffset(MSD.Name);
|
||||
MSD.Symbol->setIndex(Index++);
|
||||
MCSymbolData &Data = MSD.Symbol->getData();
|
||||
assert(((Data.getFlags() & ELF_STB_Global) ||
|
||||
(Data.getFlags() & ELF_STB_Weak)) &&
|
||||
"External symbol requires STB_GLOBAL or STB_WEAK flag");
|
||||
WriteSymbol(Writer, MSD, Layout);
|
||||
assert(MCELF::GetBinding(Data) != ELF::STB_LOCAL);
|
||||
assert(MCELF::GetBinding(MSD.Symbol->getData()) != ELF::STB_LOCAL);
|
||||
}
|
||||
for (ELFSymbolData &MSD : UndefinedSymbolData) {
|
||||
MSD.StringIndex = StrTabBuilder.getOffset(MSD.Name);
|
||||
MSD.Symbol->setIndex(Index++);
|
||||
MCSymbolData &Data = MSD.Symbol->getData();
|
||||
WriteSymbol(Writer, MSD, Layout);
|
||||
assert(MCELF::GetBinding(Data) != ELF::STB_LOCAL);
|
||||
assert(MCELF::GetBinding(MSD.Symbol->getData()) != ELF::STB_LOCAL);
|
||||
}
|
||||
|
||||
uint64_t SecEnd = OS.tell();
|
||||
|
Loading…
x
Reference in New Issue
Block a user