[yaml2obj] - Cleanup and simplify the code. NFCI.
commitd2098745a4b5c5af9056d5fd68233a8edb035be3
authorGeorge Rimar <grimar@accesssoftek.com>
Mon, 29 Apr 2019 11:54:10 +0000 (29 11:54 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Mon, 29 Apr 2019 11:54:10 +0000 (29 11:54 +0000)
treef2de67d6c91716f031c580d086cb43dba2165b9c
parentec6c7fbbaa3381fab3656417420ddc3b0592ead8
[yaml2obj] - Cleanup and simplify the code. NFCI.

The current code has the following problems:
`initSymtabSectionHeader` and `initStrtabSectionHeader` method
names saying us they are going to initialize the section headers.
Though for a few cases sh_flags field is initialized outside of them.
It does not look clean. This patch moves initialization of the
sh_flags inside these methods.

Also, it removes an excessive variable, what together with the above
change hopefully makes the code a bit more readable.

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