forked from OSchip/llvm-project
ELF2: Simplify by removing temporary variables.
llvm-svn: 247652
This commit is contained in:
parent
d558aa8627
commit
b73002fb4e
|
@ -237,19 +237,14 @@ public:
|
|||
*P++ = NumSymbols; // nbucket
|
||||
*P++ = NumSymbols; // nchain
|
||||
|
||||
std::vector<uint32_t> Buckets(NumSymbols);
|
||||
std::vector<uint32_t> Chains(NumSymbols);
|
||||
Elf_Word *Buckets = P;
|
||||
Elf_Word *Chains = P + NumSymbols;
|
||||
|
||||
for (unsigned I = 1; I < NumSymbols; ++I) {
|
||||
uint32_t Hash = Hashes[I - 1] % NumSymbols;
|
||||
Chains[I] = Buckets[Hash];
|
||||
Buckets[Hash] = I;
|
||||
}
|
||||
|
||||
for (uint32_t V : Buckets)
|
||||
*P++ = V;
|
||||
for (uint32_t V : Chains)
|
||||
*P++ = V;
|
||||
}
|
||||
|
||||
SymbolTableSection<ELFT> &getDynSymSec() { return DynSymSec; }
|
||||
|
|
Loading…
Reference in New Issue