1 //===------ OrcError.h - Reject symbol lookup requests ------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // Define an error category, error codes, and helper utilities for Orc. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_EXECUTIONENGINE_ORC_ORCERROR_H 15 #define LLVM_EXECUTIONENGINE_ORC_ORCERROR_H 16 17 #include "llvm/Support/Error.h" 18 #include <system_error> 19 20 namespace llvm { 21 namespace orc { 22 23 enum class OrcErrorCode : int { 24 // RPC Errors 25 RemoteAllocatorDoesNotExist = 1, 26 RemoteAllocatorIdAlreadyInUse, 27 RemoteMProtectAddrUnrecognized, 28 RemoteIndirectStubsOwnerDoesNotExist, 29 RemoteIndirectStubsOwnerIdAlreadyInUse, 30 RPCConnectionClosed, 31 RPCCouldNotNegotiateFunction, 32 RPCResponseAbandoned, 33 UnexpectedRPCCall, 34 UnexpectedRPCResponse, 35 UnknownErrorCodeFromRemote 36 }; 37 38 std::error_code orcError(OrcErrorCode ErrCode); 39 40 } // End namespace orc. 41 } // End namespace llvm. 42 43 #endif // LLVM_EXECUTIONENGINE_ORC_ORCERROR_H 44