[llvm] r184626 - [yaml2obj][ELF] Narrow parameter.
Sean Silva
silvas at purdue.edu
Fri Jun 21 18:37:55 PDT 2013
Author: silvas
Date: Fri Jun 21 20:37:55 2013
New Revision: 184626
URL: http://llvm.org/viewvc/llvm-project?rev=184626&view=rev
Log:
[yaml2obj][ELF] Narrow parameter.
The full ELFYAML::Section isn't needed.
Modified:
llvm/trunk/tools/yaml2obj/yaml2elf.cpp
Modified: llvm/trunk/tools/yaml2obj/yaml2elf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/yaml2obj/yaml2elf.cpp?rev=184626&r1=184625&r2=184626&view=diff
==============================================================================
--- llvm/trunk/tools/yaml2obj/yaml2elf.cpp (original)
+++ llvm/trunk/tools/yaml2obj/yaml2elf.cpp Fri Jun 21 20:37:55 2013
@@ -212,7 +212,7 @@ addSymbols(const std::vector<ELFYAML::Sy
template <class ELFT>
static void handleSymtabSectionHeader(
- const ELFYAML::Section &Sec, ELFState<ELFT> &State,
+ const ELFYAML::LocalGlobalWeakSymbols &Symbols, ELFState<ELFT> &State,
typename object::ELFObjectFile<ELFT>::Elf_Shdr &SHeader) {
typedef typename object::ELFObjectFile<ELFT>::Elf_Sym Elf_Sym;
@@ -220,7 +220,7 @@ static void handleSymtabSectionHeader(
// error for SHT_SYMTAB.
SHeader.sh_link = State.getDotStrTabSecNo();
// One greater than symbol table index of the last local symbol.
- SHeader.sh_info = Sec.Symbols.Local.size() + 1;
+ SHeader.sh_info = Symbols.Local.size() + 1;
SHeader.sh_entsize = sizeof(Elf_Sym);
std::vector<Elf_Sym> Syms;
@@ -230,9 +230,9 @@ static void handleSymtabSectionHeader(
zero(Sym);
Syms.push_back(Sym);
}
- addSymbols(Sec.Symbols.Local, State, Syms, ELF::STB_LOCAL);
- addSymbols(Sec.Symbols.Global, State, Syms, ELF::STB_GLOBAL);
- addSymbols(Sec.Symbols.Weak, State, Syms, ELF::STB_WEAK);
+ addSymbols(Symbols.Local, State, Syms, ELF::STB_LOCAL);
+ addSymbols(Symbols.Global, State, Syms, ELF::STB_GLOBAL);
+ addSymbols(Symbols.Weak, State, Syms, ELF::STB_WEAK);
ContiguousBlobAccumulator &CBA = State.getSectionContentAccum();
writeVectorData(CBA.getOSAndAlignedOffset(SHeader.sh_offset), Syms);
@@ -338,7 +338,7 @@ static int writeELF(raw_ostream &OS, con
// (and setting sh_offset and sh_size) when going through this branch
// here.
if (Sec.Type == ELFYAML::ELF_SHT(SHT_SYMTAB))
- handleSymtabSectionHeader<ELFT>(Sec, State, SHeader);
+ handleSymtabSectionHeader<ELFT>(Sec.Symbols, State, SHeader);
SHeaders.push_back(SHeader);
}
More information about the llvm-commits
mailing list