[yaml2obj] - Don't crash on invalid document.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 20 Sep 2017 09:57:11 +0000 (09:57 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 20 Sep 2017 09:57:11 +0000 (09:57 +0000)
commitcefe7e1142c082816dc3da743e4be45a2fdfe723
tree5ce18fc0ca04e5f9c8604b43035e7b89faa6f6ac
parentb0f0a1ea03b55df2c0fcd7e7d56006b7a849124b
[yaml2obj] - Don't crash on invalid document.

Previously jaml2obj would segfault on empty document.
(without yaml description).
Patch fixes the issue.

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

llvm-svn: 313746
llvm/include/llvm/Support/YAMLTraits.h
llvm/test/Object/yaml2obj-invalid.yaml [new file with mode: 0644]