[llvm] [llvm-ifs] Treat unknown symbol types as error. (PR #75872)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 20 14:12:07 PST 2023
================
@@ -201,6 +201,12 @@ Expected<std::unique_ptr<IFSStub>> ifs::readIFSFromBuffer(StringRef Buf) {
"IFS arch '" + *Stub->Target.ArchString + "' is unsupported");
Stub->Target.Arch = eMachine;
}
+ for (const auto &item : Stub->Symbols) {
+ if (item.Type == IFSSymbolType::Unknown)
+ return createStringError(
+ std::make_error_code(std::errc::invalid_argument),
+ "IFS symbol type for symbol '" + item.Name + "' is unsupported");
----------------
zeroomega wrote:
Unfortunately after YAML parsing, the original type string will not be recorded, so it is not practical right now. Unless we refractor the code to use string to store the Symbol type information and parsed it out side of LLVM YAML I/O, the type name cannot be present in the error message here.
https://github.com/llvm/llvm-project/pull/75872
More information about the llvm-commits
mailing list