File indexing completed on 2026-05-10 08:43:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_ORCERROR_H
0014 #define LLVM_EXECUTIONENGINE_ORC_SHARED_ORCERROR_H
0015
0016 #include "llvm/Support/Error.h"
0017 #include "llvm/Support/raw_ostream.h"
0018 #include <string>
0019 #include <system_error>
0020
0021 namespace llvm {
0022 namespace orc {
0023
0024 enum class OrcErrorCode : int {
0025
0026 UnknownORCError = 1,
0027 DuplicateDefinition,
0028 JITSymbolNotFound,
0029 RemoteAllocatorDoesNotExist,
0030 RemoteAllocatorIdAlreadyInUse,
0031 RemoteMProtectAddrUnrecognized,
0032 RemoteIndirectStubsOwnerDoesNotExist,
0033 RemoteIndirectStubsOwnerIdAlreadyInUse,
0034 RPCConnectionClosed,
0035 RPCCouldNotNegotiateFunction,
0036 RPCResponseAbandoned,
0037 UnexpectedRPCCall,
0038 UnexpectedRPCResponse,
0039 UnknownErrorCodeFromRemote,
0040 UnknownResourceHandle,
0041 MissingSymbolDefinitions,
0042 UnexpectedSymbolDefinitions,
0043 };
0044
0045 std::error_code orcError(OrcErrorCode ErrCode);
0046
0047 class DuplicateDefinition : public ErrorInfo<DuplicateDefinition> {
0048 public:
0049 static char ID;
0050
0051 DuplicateDefinition(std::string SymbolName);
0052 std::error_code convertToErrorCode() const override;
0053 void log(raw_ostream &OS) const override;
0054 const std::string &getSymbolName() const;
0055 private:
0056 std::string SymbolName;
0057 };
0058
0059 class JITSymbolNotFound : public ErrorInfo<JITSymbolNotFound> {
0060 public:
0061 static char ID;
0062
0063 JITSymbolNotFound(std::string SymbolName);
0064 std::error_code convertToErrorCode() const override;
0065 void log(raw_ostream &OS) const override;
0066 const std::string &getSymbolName() const;
0067 private:
0068 std::string SymbolName;
0069 };
0070
0071 }
0072 }
0073
0074 #endif