[llvm] r229538 - Add r228888 back.
Rafael Espindola
rafael.espindola at gmail.com
Tue Feb 17 12:37:50 PST 2015
Author: rafael
Date: Tue Feb 17 14:37:50 2015
New Revision: 229538
URL: http://llvm.org/viewvc/llvm-project?rev=229538&view=rev
Log:
Add r228888 back.
Original message:
Use the existing SymbolTableIndex instead of doing a lookup. 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=229538&r1=229537&r2=229538&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Tue Feb 17 14:37:50 2015
@@ -1509,11 +1509,7 @@ void ELFObjectWriter::WriteSection(MCAss
case ELF::SHT_REL:
case ELF::SHT_RELA: {
- const MCSectionELF *SymtabSection;
- const MCSectionELF *InfoSection;
- SymtabSection =
- Asm.getContext().getELFSection(".symtab", ELF::SHT_SYMTAB, 0);
- sh_link = SectionIndexMap.lookup(SymtabSection);
+ sh_link = SymbolTableIndex;
assert(sh_link && ".symtab not found");
// Remove ".rel" and ".rela" prefixes.
@@ -1522,8 +1518,8 @@ void ELFObjectWriter::WriteSection(MCAss
StringRef GroupName =
Section.getGroup() ? Section.getGroup()->getName() : "";
- InfoSection = Asm.getContext().getELFSection(SectionName, ELF::SHT_PROGBITS,
- 0, 0, GroupName);
+ const MCSectionELF *InfoSection = Asm.getContext().getELFSection(
+ SectionName, ELF::SHT_PROGBITS, 0, 0, GroupName);
sh_info = SectionIndexMap.lookup(InfoSection);
break;
}
More information about the llvm-commits
mailing list