OSDN Git Service

[yaml2obj] - Cleanup and simplify the code. NFCI.
authorGeorge Rimar <grimar@accesssoftek.com>
Mon, 29 Apr 2019 11:54:10 +0000 (11:54 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Mon, 29 Apr 2019 11:54:10 +0000 (11:54 +0000)
commit984cea84b9d7994edced7a9c132d610c83fd60b9
treef2de67d6c91716f031c580d086cb43dba2165b9c
parentee8d96fcfbda52da10066fedd5297014ad37efcd
[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