From 48f886b9de740c083344326776b0cc5c0c91df56 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 28 May 2015 19:46:36 +0000 Subject: [PATCH] Simplify LastLocalSymbolIndex computation. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238465 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/ELFObjectWriter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 69fa3e11267..639f8e7d032 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -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();