diff options
author | George Rimar <grimar@accesssoftek.com> | 2019-09-05 08:28:43 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2019-09-05 08:28:43 +0000 |
commit | 2c9c43225610433956b4ed6e2bb62b746c211d53 (patch) | |
tree | 69bd5d671b063ea970d4cbb5148dc4f65f341f79 /llvm/lib/ObjectYAML | |
parent | 4a16c295519319242f496f8206589f2a6343b0e2 (diff) | |
download | bcm5719-llvm-2c9c43225610433956b4ed6e2bb62b746c211d53.tar.gz bcm5719-llvm-2c9c43225610433956b4ed6e2bb62b746c211d53.zip |
[lib/ObjectYAML] - Stop calling error(1) when mapping the st_other field of a symbol.
This eliminates one of the error(1) call in this lib.
It is different from the others because happens on a fields mapping stage
and can be easily fixed.
Differential revision: https://reviews.llvm.org/D67150
llvm-svn: 371023
Diffstat (limited to 'llvm/lib/ObjectYAML')
-rw-r--r-- | llvm/lib/ObjectYAML/ELFYAML.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp index a81d27eed6b..068f3453d57 100644 --- a/llvm/lib/ObjectYAML/ELFYAML.cpp +++ b/llvm/lib/ObjectYAML/ELFYAML.cpp @@ -894,10 +894,8 @@ struct NormalizedOther { 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 @@ struct NormalizedOther { return Map; } - const IO &YamlIO; + IO &YamlIO; Optional<std::vector<StOtherPiece>> Other; std::string UnknownFlagsHolder; }; |