LLVM
10.0.0
include
llvm
ExecutionEngine
Orc
OrcError.h
Go to the documentation of this file.
1
//===------ OrcError.h - Reject symbol lookup requests ------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// Define an error category, error codes, and helper utilities for Orc.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_EXECUTIONENGINE_ORC_ORCERROR_H
14
#define LLVM_EXECUTIONENGINE_ORC_ORCERROR_H
15
16
#include "
llvm/Support/Error.h
"
17
#include "
llvm/Support/raw_ostream.h
"
18
#include <string>
19
#include <system_error>
20
21
namespace
llvm
{
22
namespace
orc {
23
24
enum class
OrcErrorCode
: int {
25
// RPC Errors
26
UnknownORCError
= 1,
27
DuplicateDefinition
,
28
JITSymbolNotFound
,
29
RemoteAllocatorDoesNotExist
,
30
RemoteAllocatorIdAlreadyInUse
,
31
RemoteMProtectAddrUnrecognized
,
32
RemoteIndirectStubsOwnerDoesNotExist
,
33
RemoteIndirectStubsOwnerIdAlreadyInUse
,
34
RPCConnectionClosed
,
35
RPCCouldNotNegotiateFunction
,
36
RPCResponseAbandoned
,
37
UnexpectedRPCCall
,
38
UnexpectedRPCResponse
,
39
UnknownErrorCodeFromRemote
,
40
UnknownResourceHandle
41
};
42
43
std::error_code
orcError
(
OrcErrorCode
ErrCode);
44
45
class
DuplicateDefinition
:
public
ErrorInfo
<DuplicateDefinition> {
46
public
:
47
static
char
ID
;
48
49
DuplicateDefinition
(std::string
SymbolName
);
50
std::error_code convertToErrorCode()
const override
;
51
void
log(
raw_ostream
&OS)
const override
;
52
const
std::string &
getSymbolName
()
const
;
53
private
:
54
std::string
SymbolName
;
55
};
56
57
class
JITSymbolNotFound
:
public
ErrorInfo
<JITSymbolNotFound> {
58
public
:
59
static
char
ID
;
60
61
JITSymbolNotFound
(std::string
SymbolName
);
62
std::error_code convertToErrorCode()
const override
;
63
void
log(
raw_ostream
&OS)
const override
;
64
const
std::string &
getSymbolName
()
const
;
65
private
:
66
std::string
SymbolName
;
67
};
68
69
}
// End namespace orc.
70
}
// End namespace llvm.
71
72
#endif // LLVM_EXECUTIONENGINE_ORC_ORCERROR_H
llvm::orc::OrcErrorCode::JITSymbolNotFound
llvm::orc::OrcErrorCode::UnexpectedRPCCall
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:23
llvm::orc::OrcErrorCode::UnknownErrorCodeFromRemote
llvm::orc::OrcErrorCode::UnknownResourceHandle
llvm::orc::JITSymbolNotFound
Definition:
OrcError.h:57
llvm::orc::OrcErrorCode::DuplicateDefinition
llvm::orc::OrcErrorCode::RemoteIndirectStubsOwnerIdAlreadyInUse
llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
Definition:
AMDGPUMetadata.h:371
getSymbolName
static StringRef getSymbolName(SymbolKind SymKind)
Definition:
CodeViewDebug.cpp:2930
llvm::orc::orcError
std::error_code orcError(OrcErrorCode ErrCode)
Definition:
OrcError.cpp:78
llvm::orc::OrcErrorCode::UnexpectedRPCResponse
llvm::orc::OrcErrorCode::RPCResponseAbandoned
llvm::orc::OrcErrorCode::UnknownORCError
Error.h
llvm::orc::OrcErrorCode::RemoteAllocatorDoesNotExist
llvm::orc::OrcErrorCode::RPCConnectionClosed
llvm::orc::DuplicateDefinition::ID
static char ID
Definition:
OrcError.h:47
llvm::orc::OrcErrorCode::RemoteMProtectAddrUnrecognized
llvm::orc::OrcErrorCode
OrcErrorCode
Definition:
OrcError.h:24
llvm::orc::OrcErrorCode::RPCCouldNotNegotiateFunction
llvm::orc::JITSymbolNotFound::ID
static char ID
Definition:
OrcError.h:59
llvm::ErrorInfo
Base class for user error types.
Definition:
Error.h:344
llvm::orc::OrcErrorCode::RemoteIndirectStubsOwnerDoesNotExist
llvm::orc::DuplicateDefinition
Definition:
OrcError.h:45
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition:
raw_ostream.h:46
raw_ostream.h
llvm::orc::OrcErrorCode::RemoteAllocatorIdAlreadyInUse
Generated on Tue Mar 24 2020 13:08:08 for LLVM by
1.8.13