diff options
| author | George Rimar <grimar@accesssoftek.com> | 2016-09-30 13:44:02 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2016-09-30 13:44:02 +0000 |
| commit | 3da3ffa67f7c5cca532d7f25d397dd3af6189087 (patch) | |
| tree | f2bdb7f60f6463ff38a9d170dec7ea35f9f63062 /lld/ELF | |
| parent | f85ac77c9f9e31cb7a9d8f80ea31a4c677cb45be (diff) | |
| download | bcm5719-llvm-3da3ffa67f7c5cca532d7f25d397dd3af6189087.tar.gz bcm5719-llvm-3da3ffa67f7c5cca532d7f25d397dd3af6189087.zip | |
[ELF] - Removed excessive variables. NFC.
llvm-svn: 282850
Diffstat (limited to 'lld/ELF')
| -rw-r--r-- | lld/ELF/ELFCreator.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/ELFCreator.cpp b/lld/ELF/ELFCreator.cpp index 43aa4ac8729..7ca5c4fe392 100644 --- a/lld/ELF/ELFCreator.cpp +++ b/lld/ELF/ELFCreator.cpp @@ -60,18 +60,16 @@ ELFCreator<ELFT>::ELFCreator(std::uint16_t Type, std::uint16_t Machine) { template <class ELFT> typename ELFCreator<ELFT>::Section ELFCreator<ELFT>::addSection(StringRef Name) { - std::size_t NameOff = SecHdrStrTabBuilder.add(Name); auto Shdr = new (Alloc) Elf_Shdr{}; - Shdr->sh_name = NameOff; + Shdr->sh_name = SecHdrStrTabBuilder.add(Name); Sections.push_back(Shdr); return {Shdr, Sections.size()}; } template <class ELFT> typename ELFCreator<ELFT>::Symbol ELFCreator<ELFT>::addSymbol(StringRef Name) { - std::size_t NameOff = StrTabBuilder.add(Name); auto Sym = new (Alloc) Elf_Sym{}; - Sym->st_name = NameOff; + Sym->st_name = StrTabBuilder.add(Name); StaticSymbols.push_back(Sym); return {Sym, StaticSymbols.size()}; } |

