summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/ObjectYAML/ELFYAML.cpp8
-rw-r--r--llvm/test/tools/yaml2obj/elf-symbol-stother.yaml2
2 files changed, 4 insertions, 6 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;
};
diff --git a/llvm/test/tools/yaml2obj/elf-symbol-stother.yaml b/llvm/test/tools/yaml2obj/elf-symbol-stother.yaml
index da771d690df..997a4b0be55 100644
--- a/llvm/test/tools/yaml2obj/elf-symbol-stother.yaml
+++ b/llvm/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:
OpenPOWER on IntegriCloud