aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-07-02 16:59:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-07-02 16:59:57 +0000
commit2cd195166f900cff149341998d78af2d033fdee1 (patch)
tree0ba79ff452b9d9cbf89fdb493d5ba0466f464317 /llvm/lib/MC/ELFObjectWriter.cpp
parent5fe650c5e107fa3ed0420d46a7721705748c61c0 (diff)
downloadllvm-2cd195166f900cff149341998d78af2d033fdee1.zip
llvm-2cd195166f900cff149341998d78af2d033fdee1.tar.gz
llvm-2cd195166f900cff149341998d78af2d033fdee1.tar.bz2
Convert a member variable to a local one.
llvm-svn: 241284
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 9252621..e925bc2 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -116,8 +116,6 @@ class ELFObjectWriter : public MCObjectWriter {
unsigned StringTableIndex;
// This holds the .symtab section index.
unsigned SymbolTableIndex;
- // This holds the .symtab_shndx section index.
- unsigned SymtabShndxSectionIndex = 0;
// Sections in the order they are to be output in the section table.
std::vector<const MCSectionELF *> SectionTable;
@@ -144,7 +142,6 @@ class ELFObjectWriter : public MCObjectWriter {
Renames.clear();
Relocations.clear();
StrTabBuilder.clear();
- SymtabShndxSectionIndex = 0;
SectionTable.clear();
MCObjectWriter::reset();
}
@@ -867,6 +864,9 @@ void ELFObjectWriter::computeSymbolTable(
ExternalSymbolData.push_back(MSD);
}
+ // This holds the .symtab_shndx section index.
+ unsigned SymtabShndxSectionIndex = 0;
+
if (HasLargeSectionIndex) {
MCSectionELF *SymtabShndxSection =
Ctx.getELFSection(".symtab_shndxr", ELF::SHT_SYMTAB_SHNDX, 0, 4, "");