OSDN Git Service

[yaml2obj] - Convert `ELFState<ELFT>::addSymbols` method to `toELFSymbols` helper...
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 20 Jun 2019 14:44:48 +0000 (14:44 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 20 Jun 2019 14:44:48 +0000 (14:44 +0000)
commit890c305c41abd507e18f62abd7eec88d9594d5a5
tree6db556010615b88816394ea6a744fbb940c4a9ad
parent702c4f09d38b53b2ea22e959e09ec2306ca54ff3
[yaml2obj] - Convert `ELFState<ELFT>::addSymbols` method to `toELFSymbols` helper. NFCI.

ELFState<ELFT>::addSymbols method looks a bit strange.
User code have to create the destination symbols vector outside,
add a null symbol and then pass it to addSymbols when it seems
the more natural logic is to isolate all work with symbols inside some
function, build the list right there and return it.

Differential revision: https://reviews.llvm.org/D63493

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363930 91177308-0d34-0410-b5e6-96231b3b80d8
tools/yaml2obj/yaml2elf.cpp