Revert r371023 "[lib/ObjectYAML] - Stop calling error(1) when mapping the st_other...
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Sep 2019 08:39:44 +0000 (08:39 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Sep 2019 08:39:44 +0000 (08:39 +0000)
Forgot to revert the cpp file.

llvm-svn: 371025

llvm/lib/ObjectYAML/ELFYAML.cpp

index 068f345..a81d27e 100644 (file)
@@ -894,8 +894,10 @@ struct NormalizedOther {
     if (to_integer(Name, Val))
       return Val;
 
-    YamlIO.setError("an unknown value is used for symbol's 'Other' field: " +
-                    Name);
+    llvm::WithColor::error()
+        << "an unknown value is used for symbol's 'Other' field: " << Name
+        << ".\n";
+    exit(1);
   }
 
   Optional<uint8_t> denormalize(IO &) {
@@ -940,7 +942,7 @@ struct NormalizedOther {
     return Map;
   }
 
-  IO &YamlIO;
+  const IO &YamlIO;
   Optional<std::vector<StOtherPiece>> Other;
   std::string UnknownFlagsHolder;
 };