[llvm] 9382bba - [ORC] Add missing header.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 17:44:35 PDT 2023
Author: Lang Hames
Date: 2023-03-27T17:43:58-07:00
New Revision: 9382bbad3d75806bfe095eaa494a5148f90378fc
URL: https://github.com/llvm/llvm-project/commit/9382bbad3d75806bfe095eaa494a5148f90378fc
DIFF: https://github.com/llvm/llvm-project/commit/9382bbad3d75806bfe095eaa494a5148f90378fc.diff
LOG: [ORC] Add missing header.
Accidentally left out of 8b1771bd9f3.
Added:
llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h
Modified:
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h
new file mode 100644
index 0000000000000..5c58a7255ebd8
--- /dev/null
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h
@@ -0,0 +1,54 @@
+//===--------- ExecutorSymbolDef.h - (Addr, Flags) pair ---------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Represents a defining location for a JIT symbol.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_EXECUTORSYMBOLDEF_H
+#define LLVM_EXECUTIONENGINE_ORC_SHARED_EXECUTORSYMBOLDEF_H
+
+#include "llvm/ExecutionEngine/JITSymbol.h"
+#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
+
+namespace llvm {
+namespace orc {
+
+/// Represents a defining location for a JIT symbol.
+class ExecutorSymbolDef {
+public:
+ ExecutorSymbolDef() = default;
+ ExecutorSymbolDef(ExecutorAddr Addr, JITSymbolFlags Flags)
+ : Addr(Addr), Flags(Flags) {}
+
+ const ExecutorAddr &getAddress() const { return Addr; }
+
+ const JITSymbolFlags &getFlags() const { return Flags; }
+
+ void setFlags(JITSymbolFlags Flags) { this->Flags = Flags; }
+
+ friend bool operator==(const ExecutorSymbolDef &LHS,
+ const ExecutorSymbolDef &RHS) {
+ return LHS.getAddress() == RHS.getAddress() &&
+ LHS.getFlags() == RHS.getFlags();
+ }
+
+ friend bool operator!=(const ExecutorSymbolDef &LHS,
+ const ExecutorSymbolDef &RHS) {
+ return !(LHS == RHS);
+ }
+
+private:
+ ExecutorAddr Addr;
+ JITSymbolFlags Flags;
+};
+
+} // End namespace orc.
+} // End namespace llvm.
+
+#endif // LLVM_EXECUTIONENGINE_ORC_SHARED_EXECUTORSYMBOLDEF_H
More information about the llvm-commits
mailing list