1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/ObjectYAML
George Rimar 97ff5985b5 [yaml2obj/obj2yaml] - Move Info field out from Section class.
ELFYAML.h contains a `Section` class which is a base for a few other
sections classes that are used for mapping different section types.
`Section` has a `StringRef Info` field used for storing sh_info.

At the same time, sh_info has very different meanings for sections and
cannot be processed in a similar way generally,
for example ELFDumper does not handle it in `dumpCommonSection`
but do that in `dumpGroup` and `dumpCommonRelocationSection` respectively.

At this moment, we have and handle it as a string, because that was possible for
the current use case. But also it can simply be a number:
For SHT_GNU_verdef is "The number of version definitions within the section."

The patch moves `Info` field out to be able to have it as a number. 
With that change, each class will be able to decide what type and purpose
of the sh_info field it wants to use.

I also had to edit 2 test cases. This is because patch fixes a bug. Previously we 
accepted yaml files with Info fields for all sections (for example, for SHT_DYNSYM too).
But we do not handle it and the resulting objects had zero sh_info fields set for
such sections. Now it is accepted only for sections that supports it.

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

llvm-svn: 353810
2019-02-12 09:08:59 +00:00
..
CMakeLists.txt Update obj2yaml and yaml2obj for .debug$H section. 2017-12-06 18:58:48 +00:00
CodeViewYAMLDebugSections.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeViewYAMLSymbols.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeViewYAMLTypeHashing.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeViewYAMLTypes.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
COFFYAML.cpp [COFF] Add new relocation types. 2019-01-27 19:53:36 +00:00
DWARFEmitter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DWARFVisitor.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DWARFVisitor.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DWARFYAML.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ELFYAML.cpp [yaml2obj/obj2yaml] - Move Info field out from Section class. 2019-02-12 09:08:59 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachOYAML.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjectYAML.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WasmYAML.cpp [WebAssembly] Add symbol flag to the binary format llvm.used 2019-02-07 01:24:44 +00:00
YAML.cpp [yaml::BinaryRef] Slight perf tuning (for llvm-exegesis analysis mode) 2019-02-06 08:57:01 +00:00