llvm.org GIT mirror llvm / 99defed
[yaml2obj] - Remove excessive variable. NFC. `auto &Strtab` was used only once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359300 91177308-0d34-0410-b5e6-96231b3b80d8 George Rimar 5 months ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
324324 SHeader.sh_name = DotShStrtab.getOffset(IsStatic ? ".symtab" : ".dynsym");
325325 SHeader.sh_type = IsStatic ? ELF::SHT_SYMTAB : ELF::SHT_DYNSYM;
326326 SHeader.sh_link = IsStatic ? getDotStrTabSecNo() : getDotDynStrSecNo();
327
328 // One greater than symbol table index of the last local symbol.
327329 const auto &Symbols = IsStatic ? Doc.Symbols : Doc.DynamicSymbols;
328 auto &Strtab = IsStatic ? DotStrtab : DotDynstr;
329 // One greater than symbol table index of the last local symbol.
330330 SHeader.sh_info = findFirstNonGlobal(Symbols) + 1;
331331 SHeader.sh_entsize = sizeof(Elf_Sym);
332332 SHeader.sh_addralign = 8;
351351 Syms.push_back(Sym);
352352 }
353353
354 addSymbols(Symbols, Syms, Strtab);
354 addSymbols(Symbols, Syms, IsStatic ? DotStrtab : DotDynstr);
355355
356356 writeArrayData(
357357 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign),