[llvm-readobj] - Simplify the code.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 30 Jan 2019 14:08:55 +0000 (14:08 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 30 Jan 2019 14:08:55 +0000 (14:08 +0000)
commit4b4899b0ae937aca2636c6886958e9148f75839a
tree30fa002448e530bf2c00dfa7515f290ad83a5629
parent4e442bb875132bef9f07290ae6d25810dc7c1107
[llvm-readobj] - Simplify the code.

We have a Field struct which has a StringRef member Str.

The code needs to create and keep alive the temporarily
std::string variables because of that.
That is not convenient and makes the code be more complicated
than it could be.

There seems to be no reason to keep Str be StringRef.
The patch changes it to be std::string and
rearranges the code around slightly.

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

llvm-svn: 352623
llvm/tools/llvm-readobj/ELFDumper.cpp