diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-26 21:42:36 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-26 21:42:36 +0000 |
commit | 034e2e7a8e37a3388ad444c9c5080da9cab146f2 (patch) | |
tree | eb3b6a8bbbf7d62da8e6482467717af560be8286 | |
parent | 7539b028034be8cf6abd9ea3d8e925c007903bb4 (diff) | |
download | bcm5719-llvm-034e2e7a8e37a3388ad444c9c5080da9cab146f2.tar.gz bcm5719-llvm-034e2e7a8e37a3388ad444c9c5080da9cab146f2.zip |
Define types close to use. NFC.
llvm-svn: 246085
-rw-r--r-- | lld/ELF/Writer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 430b9c12f32..3b01631d123 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -235,9 +235,7 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) { auto *ESym = reinterpret_cast<Elf_Sym *>(Buf); ESym->st_name = Builder.getOffset(Name); - uint8_t Binding = 0; SymbolBody *Body = Sym->Body; - uint8_t Type = 0; const SectionChunk<ELFT> *Section = nullptr; const Elf_Sym *InputSym = nullptr; @@ -259,10 +257,10 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) { } if (InputSym) { - Type = InputSym->getType(); - Binding = InputSym->getBinding(); + uint8_t Type = InputSym->getType(); + uint8_t Binding = InputSym->getBinding(); + ESym->setBindingAndType(Binding, Type); } - ESym->setBindingAndType(Binding, Type); if (Section) { OutputSection<ELFT> *Out = Section->getOutputSection(); |