Revert r313746 "[yaml2obj] - Don't crash on invalid document."
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 20 Sep 2017 10:24:37 +0000 (10:24 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 20 Sep 2017 10:24:37 +0000 (10:24 +0000)
It broke BB:
http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/9781

llvm-svn: 313748

llvm/include/llvm/Support/YAMLTraits.h
llvm/test/Object/yaml2obj-invalid.yaml [deleted file]

index 5f6f049..71fdf47 100644 (file)
@@ -1418,8 +1418,8 @@ inline typename std::enable_if<has_MappingTraits<T, EmptyContext>::value,
                                Input &>::type
 operator>>(Input &yin, T &docMap) {
   EmptyContext Ctx;
-  if (yin.setCurrentDocument())
-    yamlize(yin, docMap, true, Ctx);
+  yin.setCurrentDocument();
+  yamlize(yin, docMap, true, Ctx);
   return yin;
 }
 
diff --git a/llvm/test/Object/yaml2obj-invalid.yaml b/llvm/test/Object/yaml2obj-invalid.yaml
deleted file mode 100644 (file)
index d1f4fa2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# RUN: not yaml2obj %s 2>&1 | FileCheck %s
-# CHECK: Unknown document type!