ELF: Clean up section type computation
authorPavel Labath <pavel@labath.sk>
Wed, 12 Dec 2018 15:46:18 +0000 (15:46 +0000)
committerPavel Labath <pavel@labath.sk>
Wed, 12 Dec 2018 15:46:18 +0000 (15:46 +0000)
commitef8683abec6b4f36cef4bba2fd6a4b69f0e59f22
treed1d7518afc2b5d089c6106c179cfe94ad0cf42af
parent9d1fa349a46a8ace536b32bc6d6eb40fee0ebc40
ELF: Clean up section type computation

Move code into a separate function, and replace the if-else chain with
llvm::StringSwitch.

A slight behavioral change is that now I use the section flags
(SHF_TLS) instead of the section name to set the thread-specific
property. There is no explanation in the original commit introducing
this (r153537) as to why that was done this way, but the new behavior
should be more correct.

llvm-svn: 348936
lldb/lit/Modules/MachO/subsections.yaml
lldb/lit/Modules/build-id-case.yaml
lldb/lit/Modules/compressed-sections.yaml
lldb/lit/Modules/elf-section-types.yaml
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/tools/lldb-test/lldb-test.cpp