[llvm] r238465 - Simplify LastLocalSymbolIndex computation. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu May 28 12:46:36 PDT 2015
Author: rafael
Date: Thu May 28 14:46:36 2015
New Revision: 238465
URL: http://llvm.org/viewvc/llvm-project?rev=238465&view=rev
Log:
Simplify LastLocalSymbolIndex computation. NFC.
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=238465&r1=238464&r2=238465&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Thu May 28 14:46:36 2015
@@ -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();
More information about the llvm-commits
mailing list