LLVM 18.0.0git
ExecutorSymbolDef.h
Go to the documentation of this file.
1//===--------- ExecutorSymbolDef.h - (Addr, Flags) pair ---------*- 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// Represents a defining location for a JIT symbol.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_EXECUTORSYMBOLDEF_H
14#define LLVM_EXECUTIONENGINE_ORC_SHARED_EXECUTORSYMBOLDEF_H
15
18
19namespace llvm {
20namespace orc {
21
22/// Represents a defining location for a JIT symbol.
24public:
25 ExecutorSymbolDef() = default;
27 : Addr(Addr), Flags(Flags) {}
28
29 const ExecutorAddr &getAddress() const { return Addr; }
30
31 const JITSymbolFlags &getFlags() const { return Flags; }
32
33 void setFlags(JITSymbolFlags Flags) { this->Flags = Flags; }
34
35 friend bool operator==(const ExecutorSymbolDef &LHS,
36 const ExecutorSymbolDef &RHS) {
37 return LHS.getAddress() == RHS.getAddress() &&
38 LHS.getFlags() == RHS.getFlags();
39 }
40
41 friend bool operator!=(const ExecutorSymbolDef &LHS,
42 const ExecutorSymbolDef &RHS) {
43 return !(LHS == RHS);
44 }
45
46private:
47 ExecutorAddr Addr;
48 JITSymbolFlags Flags;
49};
50
51} // End namespace orc.
52} // End namespace llvm.
53
54#endif // LLVM_EXECUTIONENGINE_ORC_SHARED_EXECUTORSYMBOLDEF_H
uint64_t Addr
Value * RHS
Value * LHS
Flags for symbols in the JIT.
Definition: JITSymbol.h:74
Represents an address in the executor process.
Represents a defining location for a JIT symbol.
void setFlags(JITSymbolFlags Flags)
friend bool operator==(const ExecutorSymbolDef &LHS, const ExecutorSymbolDef &RHS)
friend bool operator!=(const ExecutorSymbolDef &LHS, const ExecutorSymbolDef &RHS)
ExecutorSymbolDef(ExecutorAddr Addr, JITSymbolFlags Flags)
const JITSymbolFlags & getFlags() const
const ExecutorAddr & getAddress() const
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18