llvm/lib
Dave Lee 37d08700eb Allow empty mappings for optional YAML input
Summary:
This change fixes a bug where `obj2yaml` can in some cases produce YAML that
causes `yaml2obj` to error.

The ELF YAML document structure has a `Sections` mapping, which contains three
mappings, all of which are optional: `Local`, `Global`, and `Weak.` Any one of
these can be missing, but if all three are missing, then `yaml2obj` errors. This
change allows YAML input for cases like this one.

I have tested this with check-llvm and check-lld, and all tests passed.

This change is the result of test failures while working on D39582, which
introduces a `DynamicSymbols` mapping, which will be empty at times.

Reviewers: compnerd, jakehehrlich, silvas, kledzik, mehdi_amini, pcc

Reviewed By: compnerd

Subscribers: silvas, llvm-commits

Differential Revision: https://reviews.llvm.org/D39908

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318428 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 17:46:11 +00:00
..
Analysis [SCEV] simplify loop. NFC. 2017-11-16 13:49:27 +00:00
AsmParser [IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math-flag 2017-11-06 16:27:15 +00:00
BinaryFormat
Bitcode [WebAssembly] Explicily disable comdat support for wasm output 2017-11-14 00:49:16 +00:00
CodeGen Fix pointer EVT in SelectionDAGBuilder::visitAlloca 2017-11-16 12:22:19 +00:00
DebugInfo [DebugInfo/PDB] Adding getUndecoratedNameEx and IPDB interfaces for IDiaEnumTables and IDiaTable. 2017-11-16 14:33:09 +00:00
Demangle
ExecutionEngine Fix 'not all control paths return a value' warning on MSVC builds 2017-11-09 14:56:17 +00:00
Fuzzer
FuzzMutate [FuzzMutate] Fix windows build after rL318407. 2017-11-16 16:17:32 +00:00
IR Fix -Werror when compiling rL318083 (ter) 2017-11-13 21:55:01 +00:00
IRReader
LineEditor
Linker
LTO LTO: clarify why we need to gracefully handle sys::fs::rename failures 2017-11-16 01:16:52 +00:00
MC NFC: Rename MCSafeSEHFragment to MCSymbolIdFragment 2017-11-08 18:57:02 +00:00
Object Use TempFile in llvm-ar. NFC. 2017-11-14 01:21:15 +00:00
ObjectYAML Reapply: Allow yaml2obj to order implicit sections for ELF 2017-11-09 14:53:43 +00:00
Option
Passes [(new) Pass Manager] instantiate SimplifyCFG with the same options as the old PM 2017-11-15 16:33:11 +00:00
ProfileData [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
Support Allow empty mappings for optional YAML input 2017-11-16 17:46:11 +00:00
TableGen [globalisel][regbank] Warn about MIR ambiguities when register bank/class names clash. 2017-11-01 22:13:05 +00:00
Target [TTI][X86] update costs of interleaved load\store of i64\double 2017-11-16 09:38:32 +00:00
Testing Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
ToolDrivers
Transforms [asan] Fix small X86_64 ShadowOffset for non-default shadow scale 2017-11-16 17:03:00 +00:00
WindowsManifest
XRay [XRay] Stable sort XRayRecord to remove non-deterministic ordering 2017-11-14 18:11:08 +00:00
CMakeLists.txt
LLVMBuild.txt