]> granicus.if.org Git - llvm/commit
[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)
commitdc78263c749583c7067aed59df4091d88f3d1ad4
tree5b87b8f4bcad7b48b7c26ef3a958e74904a89982
parent511f143e3852906c35f5ffb4a4526f2d19ff1324
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352623 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-readobj/ELFDumper.cpp