1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[ORC] Introduce ExecutorAddress type, fix broken LLDB bot.

ExecutorAddressRange depended on JITTargetAddress, but JITTargetAddress is
defined in ExecutionEngine, which OrcShared should not depend on.

This seems like as good a time as any to introduce a new ExecutorAddress type
to eventually replace JITTargetAddress. For now it's just another uint64_t
alias, but it will soon be changed to a class type to provide greater type
safety.
This commit is contained in:
Lang Hames 2021-07-08 16:29:39 +10:00
parent bee25fbe59
commit 2d682bd2a2

View File

@ -19,18 +19,20 @@ namespace llvm {
namespace orc {
namespace shared {
// Placeholder for future replacement for JITTargetAddress.
using ExecutorAddress = uint64_t;
/// Represents an address range in the exceutor process.
struct ExecutorAddressRange {
ExecutorAddressRange() = default;
ExecutorAddressRange(JITTargetAddress StartAddress,
JITTargetAddress EndAddress)
ExecutorAddressRange(ExecutorAddress StartAddress, ExecutorAddress EndAddress)
: StartAddress(StartAddress), EndAddress(EndAddress) {}
bool empty() const { return StartAddress == EndAddress; }
size_t size() const { return EndAddress - StartAddress; }
JITTargetAddress StartAddress = 0;
JITTargetAddress EndAddress = 0;
ExecutorAddress StartAddress = 0;
ExecutorAddress EndAddress = 0;
};
using SPSExecutorAddressRange =