[Orc] Take another shot at working around the GCC 4.7 ICE in
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / OrcError.h
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 <system_error>
18
19 namespace llvm {
20 namespace orc {
21
22 enum class OrcErrorCode : int {
23   // RPC Errors
24   RemoteAllocatorDoesNotExist = 1,
25   RemoteAllocatorIdAlreadyInUse,
26   RemoteMProtectAddrUnrecognized,
27   RemoteIndirectStubsOwnerDoesNotExist,
28   RemoteIndirectStubsOwnerIdAlreadyInUse,
29   UnexpectedRPCCall
30 };
31
32 std::error_code orcError(OrcErrorCode ErrCode);
33
34 } // End namespace orc.
35 } // End namespace llvm.
36
37 #endif // LLVM_EXECUTIONENGINE_ORC_ORCERROR_H