]> granicus.if.org Git - llvm/commitdiff
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371025 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ObjectYAML/ELFYAML.cpp

index 068f3453d577bca6cd9faf22bb132cd611573198..a81d27eed6b890f4fdb7c3383e43a3359056143a 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;
 };