Fix: added missing return "return 0;"
Original commit message:
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371030
91177308-0d34-0410-b5e6-
96231b3b80d8
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);
+ return 0;
}
Optional<uint8_t> denormalize(IO &) {
return Map;
}
- const IO &YamlIO;
+ IO &YamlIO;
Optional<std::vector<StOtherPiece>> Other;
std::string UnknownFlagsHolder;
};
## 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: