[PATCH] D67150: [lib/ObjectYAML] - Stop calling error(1) when mapping the st_other field of a symbol.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 01:27:32 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL371023: [lib/ObjectYAML] - Stop calling error(1) when mapping the st_other field of a… (authored by grimar, committed by ).
Herald added a project: LLVM.

Changed prior to commit:
  https://reviews.llvm.org/D67150?vs=218634&id=218856#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67150/new/

https://reviews.llvm.org/D67150

Files:
  llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
  llvm/trunk/test/tools/yaml2obj/elf-symbol-stother.yaml


Index: llvm/trunk/test/tools/yaml2obj/elf-symbol-stother.yaml
===================================================================
--- llvm/trunk/test/tools/yaml2obj/elf-symbol-stother.yaml
+++ llvm/trunk/test/tools/yaml2obj/elf-symbol-stother.yaml
@@ -4,7 +4,7 @@
 ## to a different machine type to what is specified by the YAML.
 
 # RUN: not yaml2obj --docnum=1 2>&1 %s | FileCheck %s --check-prefix=ERR
-# ERR: error: an unknown value is used for symbol's 'Other' field: STO_MIPS_OPTIONAL.
+# ERR: error: an unknown value is used for symbol's 'Other' field: STO_MIPS_OPTIONAL
 
 --- !ELF
 FileHeader:
Index: llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
===================================================================
--- llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
+++ llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
@@ -894,10 +894,8 @@
     if (to_integer(Name, Val))
       return Val;
 
-    llvm::WithColor::error()
-        << "an unknown value is used for symbol's 'Other' field: " << Name
-        << ".\n";
-    exit(1);
+    YamlIO.setError("an unknown value is used for symbol's 'Other' field: " +
+                    Name);
   }
 
   Optional<uint8_t> denormalize(IO &) {
@@ -942,7 +940,7 @@
     return Map;
   }
 
-  const IO &YamlIO;
+  IO &YamlIO;
   Optional<std::vector<StOtherPiece>> Other;
   std::string UnknownFlagsHolder;
 };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67150.218856.patch
Type: text/x-patch
Size: 1334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190905/f0da0b6f/attachment.bin>


More information about the llvm-commits mailing list