[llvm] [llvm-ifs] Treat unknown symbol types as error. (PR #75872)
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 00:24:58 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");
----------------
petrhosek wrote:
I agree about making the error message consistent (and changing them in a follow up PR).
https://github.com/llvm/llvm-project/pull/75872
More information about the llvm-commits
mailing list