aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine/JITSymbol.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:12 +0000
commite6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch)
tree599ab169a01f1c86eda9adc774edaedde2f2db5b /include/llvm/ExecutionEngine/JITSymbol.h
parent1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff)
Diffstat (limited to 'include/llvm/ExecutionEngine/JITSymbol.h')
-rw-r--r--include/llvm/ExecutionEngine/JITSymbol.h34
1 files changed, 7 insertions, 27 deletions
diff --git a/include/llvm/ExecutionEngine/JITSymbol.h b/include/llvm/ExecutionEngine/JITSymbol.h
index 05c9590726df..b14154c5b5e8 100644
--- a/include/llvm/ExecutionEngine/JITSymbol.h
+++ b/include/llvm/ExecutionEngine/JITSymbol.h
@@ -1,9 +1,8 @@
//===- JITSymbol.h - JIT symbol abstraction ---------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// 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
//
//===----------------------------------------------------------------------===//
//
@@ -56,7 +55,7 @@ template <typename T> JITTargetAddress pointerToJITTargetAddress(T *Ptr) {
class JITSymbolFlags {
public:
using UnderlyingType = uint8_t;
- using TargetFlagsType = uint64_t;
+ using TargetFlagsType = uint8_t;
enum FlagNames : UnderlyingType {
None = 0,
@@ -66,15 +65,9 @@ public:
Absolute = 1U << 3,
Exported = 1U << 4,
Callable = 1U << 5,
- Lazy = 1U << 6,
- Materializing = 1U << 7,
- LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ Materializing)
+ LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ Callable)
};
- static JITSymbolFlags stripTransientFlags(JITSymbolFlags Orig) {
- return static_cast<FlagNames>(Orig.Flags & ~Lazy & ~Materializing);
- }
-
/// Default-construct a JITSymbolFlags instance.
JITSymbolFlags() = default;
@@ -84,7 +77,7 @@ public:
/// Construct a JITSymbolFlags instance from the given flags and target
/// flags.
JITSymbolFlags(FlagNames Flags, TargetFlagsType TargetFlags)
- : Flags(Flags), TargetFlags(TargetFlags) {}
+ : TargetFlags(TargetFlags), Flags(Flags) {}
/// Implicitly convert to bool. Returs true if any flag is set.
explicit operator bool() const { return Flags != None || TargetFlags != 0; }
@@ -111,19 +104,6 @@ public:
return (Flags & HasError) == HasError;
}
- /// Returns true if this is a lazy symbol.
- /// This flag is used internally by the JIT APIs to track
- /// materialization states.
- bool isLazy() const { return Flags & Lazy; }
-
- /// Returns true if this symbol is in the process of being
- /// materialized.
- bool isMaterializing() const { return Flags & Materializing; }
-
- /// Returns true if this symbol is fully materialized.
- /// (i.e. neither lazy, nor materializing).
- bool isMaterialized() const { return !(Flags & (Lazy | Materializing)); }
-
/// Returns true if the Weak flag is set.
bool isWeak() const {
return (Flags & Weak) == Weak;
@@ -168,8 +148,8 @@ public:
fromObjectSymbol(const object::SymbolRef &Symbol);
private:
- FlagNames Flags = None;
TargetFlagsType TargetFlags = 0;
+ FlagNames Flags = None;
};
inline JITSymbolFlags operator&(const JITSymbolFlags &LHS,