Update prebuilt Clang to match Android kernel.
Bug: 132428451
Change-Id: I8f6e2cb23f381fc0c02ddea99b867e58e925e5be
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/ExecutionEngine.h b/linux-x64/clang/include/llvm/ExecutionEngine/ExecutionEngine.h
index b61cb24..68cc920 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -1,9 +1,8 @@
//===- ExecutionEngine.h - Abstract Execution Engine Interface --*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/GenericValue.h b/linux-x64/clang/include/llvm/ExecutionEngine/GenericValue.h
index 504e30a..1ca989d 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/GenericValue.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/GenericValue.h
@@ -1,9 +1,8 @@
//===- GenericValue.h - Represent any type of LLVM value --------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Interpreter.h b/linux-x64/clang/include/llvm/ExecutionEngine/Interpreter.h
index a147078..0749409 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Interpreter.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Interpreter.h
@@ -1,9 +1,8 @@
//===-- Interpreter.h - Abstract Execution Engine Interface -----*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/JITEventListener.h b/linux-x64/clang/include/llvm/ExecutionEngine/JITEventListener.h
index 1ce772c..606b6f7 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/JITEventListener.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/JITEventListener.h
@@ -1,9 +1,8 @@
//===- JITEventListener.h - Exposes events from JIT compilation -*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -35,25 +34,6 @@
} // end namespace object
-/// JITEvent_EmittedFunctionDetails - Helper struct for containing information
-/// about a generated machine code function.
-struct JITEvent_EmittedFunctionDetails {
- struct LineStart {
- /// The address at which the current line changes.
- uintptr_t Address;
-
- /// The new location information. These can be translated to DebugLocTuples
- /// using MF->getDebugLocTuple().
- DebugLoc Loc;
- };
-
- /// The machine function the struct contains information for.
- const MachineFunction *MF;
-
- /// The list of line boundary information, sorted by address.
- std::vector<LineStart> LineStarts;
-};
-
/// JITEventListener - Abstract interface for use by the JIT to notify clients
/// about significant events during compilation. For example, to notify
/// profilers and debuggers that need to know where functions have been emitted.
@@ -61,26 +41,26 @@
/// The default implementation of each method does nothing.
class JITEventListener {
public:
- using EmittedFunctionDetails = JITEvent_EmittedFunctionDetails;
+ using ObjectKey = uint64_t;
-public:
JITEventListener() = default;
virtual ~JITEventListener() = default;
- /// NotifyObjectEmitted - Called after an object has been successfully
- /// emitted to memory. NotifyFunctionEmitted will not be called for
+ /// notifyObjectLoaded - Called after an object has had its sections allocated
+ /// and addresses assigned to all symbols. Note: Section memory will not have
+ /// been relocated yet. notifyFunctionLoaded will not be called for
/// individual functions in the object.
///
/// ELF-specific information
/// The ObjectImage contains the generated object image
/// with section headers updated to reflect the address at which sections
/// were loaded and with relocations performed in-place on debug sections.
- virtual void NotifyObjectEmitted(const object::ObjectFile &Obj,
- const RuntimeDyld::LoadedObjectInfo &L) {}
+ virtual void notifyObjectLoaded(ObjectKey K, const object::ObjectFile &Obj,
+ const RuntimeDyld::LoadedObjectInfo &L) {}
- /// NotifyFreeingObject - Called just before the memory associated with
+ /// notifyFreeingObject - Called just before the memory associated with
/// a previously emitted object is released.
- virtual void NotifyFreeingObject(const object::ObjectFile &Obj) {}
+ virtual void notifyFreeingObject(ObjectKey K) {}
// Get a pointe to the GDB debugger registration listener.
static JITEventListener *createGDBRegistrationListener();
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/JITSymbol.h b/linux-x64/clang/include/llvm/ExecutionEngine/JITSymbol.h
index 18b972e..da1352f 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/JITSymbol.h
+++ b/linux-x64/clang/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
//
//===----------------------------------------------------------------------===//
//
@@ -40,6 +39,18 @@
/// Represents an address in the target process's address space.
using JITTargetAddress = uint64_t;
+/// Convert a JITTargetAddress to a pointer.
+template <typename T> T jitTargetAddressToPointer(JITTargetAddress Addr) {
+ static_assert(std::is_pointer<T>::value, "T must be a pointer type");
+ uintptr_t IntPtr = static_cast<uintptr_t>(Addr);
+ assert(IntPtr == Addr && "JITTargetAddress value out of range for uintptr_t");
+ return reinterpret_cast<T>(IntPtr);
+}
+
+template <typename T> JITTargetAddress pointerToJITTargetAddress(T *Ptr) {
+ return static_cast<JITTargetAddress>(reinterpret_cast<uintptr_t>(Ptr));
+}
+
/// Flags for symbols in the JIT.
class JITSymbolFlags {
public:
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/MCJIT.h b/linux-x64/clang/include/llvm/ExecutionEngine/MCJIT.h
index 66ddb7c..8253bf9 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/MCJIT.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/MCJIT.h
@@ -1,9 +1,8 @@
//===-- MCJIT.h - MC-Based Just-In-Time Execution Engine --------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/OProfileWrapper.h b/linux-x64/clang/include/llvm/ExecutionEngine/OProfileWrapper.h
index 05da594..b13d7f6 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/OProfileWrapper.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/OProfileWrapper.h
@@ -1,9 +1,8 @@
//===-- OProfileWrapper.h - OProfile JIT API Wrapper ------------*- 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
//
//===----------------------------------------------------------------------===//
// This file defines a OProfileWrapper object that detects if the oprofile
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/ObjectCache.h b/linux-x64/clang/include/llvm/ExecutionEngine/ObjectCache.h
index 0770444..47e94f1 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/ObjectCache.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/ObjectCache.h
@@ -1,9 +1,8 @@
//===-- ObjectCache.h - Class definition for the ObjectCache ----*- 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
//
//===----------------------------------------------------------------------===//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
index 2003f8e..ca1ce40 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
@@ -1,9 +1,8 @@
//===- CompileOnDemandLayer.h - Compile each function on demand -*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -62,7 +61,7 @@
class ExtractingIRMaterializationUnit;
-class CompileOnDemandLayer2 : public IRLayer {
+class CompileOnDemandLayer : public IRLayer {
friend class PartitioningIRMaterializationUnit;
public:
@@ -84,8 +83,8 @@
/// symbol in them is requested.
static Optional<GlobalValueSet> compileWholeModule(GlobalValueSet Requested);
- /// Construct a CompileOnDemandLayer2.
- CompileOnDemandLayer2(ExecutionSession &ES, IRLayer &BaseLayer,
+ /// Construct a CompileOnDemandLayer.
+ CompileOnDemandLayer(ExecutionSession &ES, IRLayer &BaseLayer,
LazyCallThroughManager &LCTMgr,
IndirectStubsManagerBuilder BuildIndirectStubsManager);
@@ -94,8 +93,7 @@
/// Emits the given module. This should not be called by clients: it will be
/// called by the JIT when a definition added via the add method is requested.
- void emit(MaterializationResponsibility R, VModuleKey K,
- ThreadSafeModule TSM) override;
+ void emit(MaterializationResponsibility R, ThreadSafeModule TSM) override;
private:
struct PerDylibResources {
@@ -142,7 +140,7 @@
template <typename BaseLayerT,
typename CompileCallbackMgrT = JITCompileCallbackManager,
typename IndirectStubsMgrT = IndirectStubsManager>
-class CompileOnDemandLayer {
+class LegacyCompileOnDemandLayer {
private:
template <typename MaterializerFtor>
class LambdaMaterializer final : public ValueMaterializer {
@@ -266,13 +264,13 @@
std::function<void(VModuleKey K, std::shared_ptr<SymbolResolver> R)>;
/// Construct a compile-on-demand layer instance.
- CompileOnDemandLayer(ExecutionSession &ES, BaseLayerT &BaseLayer,
- SymbolResolverGetter GetSymbolResolver,
- SymbolResolverSetter SetSymbolResolver,
- PartitioningFtor Partition,
- CompileCallbackMgrT &CallbackMgr,
- IndirectStubsManagerBuilderT CreateIndirectStubsManager,
- bool CloneStubsIntoPartitions = true)
+ LegacyCompileOnDemandLayer(ExecutionSession &ES, BaseLayerT &BaseLayer,
+ SymbolResolverGetter GetSymbolResolver,
+ SymbolResolverSetter SetSymbolResolver,
+ PartitioningFtor Partition,
+ CompileCallbackMgrT &CallbackMgr,
+ IndirectStubsManagerBuilderT CreateIndirectStubsManager,
+ bool CloneStubsIntoPartitions = true)
: ES(ES), BaseLayer(BaseLayer),
GetSymbolResolver(std::move(GetSymbolResolver)),
SetSymbolResolver(std::move(SetSymbolResolver)),
@@ -280,7 +278,7 @@
CreateIndirectStubsManager(std::move(CreateIndirectStubsManager)),
CloneStubsIntoPartitions(CloneStubsIntoPartitions) {}
- ~CompileOnDemandLayer() {
+ ~LegacyCompileOnDemandLayer() {
// FIXME: Report error on log.
while (!LogicalDylibs.empty())
consumeError(removeModule(LogicalDylibs.begin()->first));
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileUtils.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileUtils.h
index 3d02f9d..15a6566 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileUtils.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/CompileUtils.h
@@ -1,9 +1,8 @@
//===- CompileUtils.h - Utilities for compiling IR in the JIT ---*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -38,7 +37,7 @@
/// Simple compile functor: Takes a single IR module and returns an ObjectFile.
/// This compiler supports a single compilation thread and LLVMContext only.
-/// For multithreaded compilation, use MultiThreadedSimpleCompiler below.
+/// For multithreaded compilation, use ConcurrentIRCompiler below.
class SimpleCompiler {
public:
using CompileResult = std::unique_ptr<MemoryBuffer>;
@@ -105,10 +104,10 @@
///
/// This class creates a new TargetMachine and SimpleCompiler instance for each
/// compile.
-class MultiThreadedSimpleCompiler {
+class ConcurrentIRCompiler {
public:
- MultiThreadedSimpleCompiler(JITTargetMachineBuilder JTMB,
- ObjectCache *ObjCache = nullptr)
+ ConcurrentIRCompiler(JITTargetMachineBuilder JTMB,
+ ObjectCache *ObjCache = nullptr)
: JTMB(std::move(JTMB)), ObjCache(ObjCache) {}
void setObjectCache(ObjectCache *ObjCache) { this->ObjCache = ObjCache; }
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Core.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Core.h
index f3ea2ae..299247a 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Core.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Core.h
@@ -1,9 +1,8 @@
//===------ Core.h -- Core ORC APIs (Layer, JITDylib, etc.) -----*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -20,10 +19,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
-#include <list>
-#include <map>
#include <memory>
-#include <set>
#include <vector>
#define DEBUG_TYPE "orc"
@@ -44,21 +40,21 @@
/// A set of symbol names (represented by SymbolStringPtrs for
// efficiency).
-using SymbolNameSet = std::set<SymbolStringPtr>;
+using SymbolNameSet = DenseSet<SymbolStringPtr>;
/// A map from symbol names (as SymbolStringPtrs) to JITSymbols
/// (address/flags pairs).
-using SymbolMap = std::map<SymbolStringPtr, JITEvaluatedSymbol>;
+using SymbolMap = DenseMap<SymbolStringPtr, JITEvaluatedSymbol>;
/// A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
-using SymbolFlagsMap = std::map<SymbolStringPtr, JITSymbolFlags>;
+using SymbolFlagsMap = DenseMap<SymbolStringPtr, JITSymbolFlags>;
/// A base class for materialization failures that allows the failing
/// symbols to be obtained for logging.
-using SymbolDependenceMap = std::map<JITDylib *, SymbolNameSet>;
+using SymbolDependenceMap = DenseMap<JITDylib *, SymbolNameSet>;
-/// A list of JITDylib pointers.
-using JITDylibList = std::vector<JITDylib *>;
+/// A list of (JITDylib*, bool) pairs.
+using JITDylibSearchList = std::vector<std::pair<JITDylib *, bool>>;
/// Render a SymbolStringPtr.
raw_ostream &operator<<(raw_ostream &OS, const SymbolStringPtr &Sym);
@@ -88,8 +84,8 @@
/// Render a MaterializationUnit.
raw_ostream &operator<<(raw_ostream &OS, const MaterializationUnit &MU);
-/// Render a JITDylibList.
-raw_ostream &operator<<(raw_ostream &OS, const JITDylibList &JDs);
+/// Render a JITDylibSearchList.
+raw_ostream &operator<<(raw_ostream &OS, const JITDylibSearchList &JDs);
/// Callback to notify client that symbols have been resolved.
using SymbolsResolvedCallback = std::function<void(Expected<SymbolMap>)>;
@@ -171,6 +167,9 @@
/// into.
JITDylib &getTargetJITDylib() const { return JD; }
+ /// Returns the VModuleKey for this instance.
+ VModuleKey getVModuleKey() const { return K; }
+
/// Returns the symbol flags map for this responsibility instance.
/// Note: The returned flags may have transient flags (Lazy, Materializing)
/// set. These should be stripped with JITSymbolFlags::stripTransientFlags
@@ -221,7 +220,8 @@
/// Delegates responsibility for the given symbols to the returned
/// materialization responsibility. Useful for breaking up work between
/// threads, or different kinds of materialization processes.
- MaterializationResponsibility delegate(const SymbolNameSet &Symbols);
+ MaterializationResponsibility delegate(const SymbolNameSet &Symbols,
+ VModuleKey NewKey = VModuleKey());
void addDependencies(const SymbolStringPtr &Name,
const SymbolDependenceMap &Dependencies);
@@ -232,10 +232,12 @@
private:
/// Create a MaterializationResponsibility for the given JITDylib and
/// initial symbols.
- MaterializationResponsibility(JITDylib &JD, SymbolFlagsMap SymbolFlags);
+ MaterializationResponsibility(JITDylib &JD, SymbolFlagsMap SymbolFlags,
+ VModuleKey K);
JITDylib &JD;
SymbolFlagsMap SymbolFlags;
+ VModuleKey K;
};
/// A MaterializationUnit represents a set of symbol definitions that can
@@ -248,8 +250,8 @@
/// stronger definition is added or already present.
class MaterializationUnit {
public:
- MaterializationUnit(SymbolFlagsMap InitalSymbolFlags)
- : SymbolFlags(std::move(InitalSymbolFlags)) {}
+ MaterializationUnit(SymbolFlagsMap InitalSymbolFlags, VModuleKey K)
+ : SymbolFlags(std::move(InitalSymbolFlags)), K(std::move(K)) {}
virtual ~MaterializationUnit() {}
@@ -264,7 +266,8 @@
/// ExecutionSession::DispatchMaterializationFunction) to trigger
/// materialization of this MaterializationUnit.
void doMaterialize(JITDylib &JD) {
- materialize(MaterializationResponsibility(JD, std::move(SymbolFlags)));
+ materialize(MaterializationResponsibility(JD, std::move(SymbolFlags),
+ std::move(K)));
}
/// Called by JITDylibs to notify MaterializationUnits that the given symbol
@@ -276,6 +279,7 @@
protected:
SymbolFlagsMap SymbolFlags;
+ VModuleKey K;
private:
virtual void anchor();
@@ -301,7 +305,7 @@
/// materialized.
class AbsoluteSymbolsMaterializationUnit : public MaterializationUnit {
public:
- AbsoluteSymbolsMaterializationUnit(SymbolMap Symbols);
+ AbsoluteSymbolsMaterializationUnit(SymbolMap Symbols, VModuleKey K);
StringRef getName() const override;
@@ -324,9 +328,9 @@
/// \endcode
///
inline std::unique_ptr<AbsoluteSymbolsMaterializationUnit>
-absoluteSymbols(SymbolMap Symbols) {
+absoluteSymbols(SymbolMap Symbols, VModuleKey K = VModuleKey()) {
return llvm::make_unique<AbsoluteSymbolsMaterializationUnit>(
- std::move(Symbols));
+ std::move(Symbols), std::move(K));
}
struct SymbolAliasMapEntry {
@@ -339,20 +343,22 @@
};
/// A map of Symbols to (Symbol, Flags) pairs.
-using SymbolAliasMap = std::map<SymbolStringPtr, SymbolAliasMapEntry>;
+using SymbolAliasMap = DenseMap<SymbolStringPtr, SymbolAliasMapEntry>;
/// A materialization unit for symbol aliases. Allows existing symbols to be
/// aliased with alternate flags.
class ReExportsMaterializationUnit : public MaterializationUnit {
public:
/// SourceJD is allowed to be nullptr, in which case the source JITDylib is
- /// taken to be whatever JITDylib these definitions are materialized in. This
- /// is useful for defining aliases within a JITDylib.
+ /// taken to be whatever JITDylib these definitions are materialized in (and
+ /// MatchNonExported has no effect). This is useful for defining aliases
+ /// within a JITDylib.
///
/// Note: Care must be taken that no sets of aliases form a cycle, as such
/// a cycle will result in a deadlock when any symbol in the cycle is
/// resolved.
- ReExportsMaterializationUnit(JITDylib *SourceJD, SymbolAliasMap Aliases);
+ ReExportsMaterializationUnit(JITDylib *SourceJD, bool MatchNonExported,
+ SymbolAliasMap Aliases, VModuleKey K);
StringRef getName() const override;
@@ -362,6 +368,7 @@
static SymbolFlagsMap extractFlags(const SymbolAliasMap &Aliases);
JITDylib *SourceJD = nullptr;
+ bool MatchNonExported = false;
SymbolAliasMap Aliases;
};
@@ -377,17 +384,21 @@
/// return Err;
/// \endcode
inline std::unique_ptr<ReExportsMaterializationUnit>
-symbolAliases(SymbolAliasMap Aliases) {
- return llvm::make_unique<ReExportsMaterializationUnit>(nullptr,
- std::move(Aliases));
+symbolAliases(SymbolAliasMap Aliases, VModuleKey K = VModuleKey()) {
+ return llvm::make_unique<ReExportsMaterializationUnit>(
+ nullptr, true, std::move(Aliases), std::move(K));
}
/// Create a materialization unit for re-exporting symbols from another JITDylib
/// with alternative names/flags.
+/// If MatchNonExported is true then non-exported symbols from SourceJD can be
+/// re-exported. If it is false, attempts to re-export a non-exported symbol
+/// will result in a "symbol not found" error.
inline std::unique_ptr<ReExportsMaterializationUnit>
-reexports(JITDylib &SourceJD, SymbolAliasMap Aliases) {
- return llvm::make_unique<ReExportsMaterializationUnit>(&SourceJD,
- std::move(Aliases));
+reexports(JITDylib &SourceJD, SymbolAliasMap Aliases,
+ bool MatchNonExported = false, VModuleKey K = VModuleKey()) {
+ return llvm::make_unique<ReExportsMaterializationUnit>(
+ &SourceJD, MatchNonExported, std::move(Aliases), std::move(K));
}
/// Build a SymbolAliasMap for the common case where you want to re-export
@@ -395,15 +406,23 @@
Expected<SymbolAliasMap>
buildSimpleReexportsAliasMap(JITDylib &SourceJD, const SymbolNameSet &Symbols);
-class ReexportsFallbackDefinitionGenerator {
+/// ReexportsGenerator can be used with JITDylib::setGenerator to automatically
+/// re-export a subset of the source JITDylib's symbols in the target.
+class ReexportsGenerator {
public:
using SymbolPredicate = std::function<bool(SymbolStringPtr)>;
- ReexportsFallbackDefinitionGenerator(JITDylib &BackingJD,
- SymbolPredicate Allow);
+
+ /// Create a reexports generator. If an Allow predicate is passed, only
+ /// symbols for which the predicate returns true will be reexported. If no
+ /// Allow predicate is passed, all symbols will be exported.
+ ReexportsGenerator(JITDylib &SourceJD, bool MatchNonExported = false,
+ SymbolPredicate Allow = SymbolPredicate());
+
SymbolNameSet operator()(JITDylib &JD, const SymbolNameSet &Names);
private:
- JITDylib &BackingJD;
+ JITDylib &SourceJD;
+ bool MatchNonExported = false;
SymbolPredicate Allow;
};
@@ -478,11 +497,11 @@
friend class ExecutionSession;
friend class MaterializationResponsibility;
public:
- using FallbackDefinitionGeneratorFunction = std::function<SymbolNameSet(
+ using GeneratorFunction = std::function<SymbolNameSet(
JITDylib &Parent, const SymbolNameSet &Names)>;
using AsynchronousSymbolQuerySet =
- std::set<std::shared_ptr<AsynchronousSymbolQuery>>;
+ std::set<std::shared_ptr<AsynchronousSymbolQuery>>;
JITDylib(const JITDylib &) = delete;
JITDylib &operator=(const JITDylib &) = delete;
@@ -495,12 +514,12 @@
/// Get a reference to the ExecutionSession for this JITDylib.
ExecutionSession &getExecutionSession() const { return ES; }
- /// Set a fallback defenition generator. If set, lookup and lookupFlags will
- /// pass the unresolved symbols set to the fallback definition generator,
- /// allowing it to add a new definition to the JITDylib.
- void setFallbackDefinitionGenerator(
- FallbackDefinitionGeneratorFunction FallbackDefinitionGenerator) {
- this->FallbackDefinitionGenerator = std::move(FallbackDefinitionGenerator);
+ /// Set a definition generator. If set, whenever a symbol fails to resolve
+ /// within this JITDylib, lookup and lookupFlags will pass the unresolved
+ /// symbols set to the definition generator. The generator can optionally
+ /// add a definition for the unresolved symbols to the dylib.
+ void setGenerator(GeneratorFunction DefGenerator) {
+ this->DefGenerator = std::move(DefGenerator);
}
/// Set the search order to be used when fixing up definitions in JITDylib.
@@ -522,16 +541,18 @@
/// as the first in the search order (instead of this dylib) ensures that
/// definitions within this dylib resolve to the lazy-compiling stubs,
/// rather than immediately materializing the definitions in this dylib.
- void setSearchOrder(JITDylibList NewSearchOrder,
- bool SearchThisJITDylibFirst = true);
+ void setSearchOrder(JITDylibSearchList NewSearchOrder,
+ bool SearchThisJITDylibFirst = true,
+ bool MatchNonExportedInThisDylib = true);
/// Add the given JITDylib to the search order for definitions in this
/// JITDylib.
- void addToSearchOrder(JITDylib &JD);
+ void addToSearchOrder(JITDylib &JD, bool MatcNonExported = false);
/// Replace OldJD with NewJD in the search order if OldJD is present.
/// Otherwise this operation is a no-op.
- void replaceInSearchOrder(JITDylib &OldJD, JITDylib &NewJD);
+ void replaceInSearchOrder(JITDylib &OldJD, JITDylib &NewJD,
+ bool MatchNonExported = false);
/// Remove the given JITDylib from the search order for this JITDylib if it is
/// present. Otherwise this operation is a no-op.
@@ -540,7 +561,7 @@
/// Do something with the search order (run under the session lock).
template <typename Func>
auto withSearchOrderDo(Func &&F)
- -> decltype(F(std::declval<const JITDylibList &>()));
+ -> decltype(F(std::declval<const JITDylibSearchList &>()));
/// Define all symbols provided by the materialization unit to be part of this
/// JITDylib.
@@ -602,7 +623,7 @@
};
using UnmaterializedInfosMap =
- std::map<SymbolStringPtr, std::shared_ptr<UnmaterializedInfo>>;
+ DenseMap<SymbolStringPtr, std::shared_ptr<UnmaterializedInfo>>;
struct MaterializingInfo {
AsynchronousSymbolQueryList PendingQueries;
@@ -611,7 +632,7 @@
bool IsEmitted = false;
};
- using MaterializingInfosMap = std::map<SymbolStringPtr, MaterializingInfo>;
+ using MaterializingInfosMap = DenseMap<SymbolStringPtr, MaterializingInfo>;
using LookupImplActionFlags = enum {
None = 0,
@@ -628,10 +649,12 @@
const SymbolNameSet &Names);
void lodgeQuery(std::shared_ptr<AsynchronousSymbolQuery> &Q,
- SymbolNameSet &Unresolved, MaterializationUnitList &MUs);
+ SymbolNameSet &Unresolved, bool MatchNonExported,
+ MaterializationUnitList &MUs);
void lodgeQueryImpl(std::shared_ptr<AsynchronousSymbolQuery> &Q,
- SymbolNameSet &Unresolved, MaterializationUnitList &MUs);
+ SymbolNameSet &Unresolved, bool MatchNonExported,
+ MaterializationUnitList &MUs);
LookupImplActionFlags
lookupImpl(std::shared_ptr<AsynchronousSymbolQuery> &Q,
@@ -665,8 +688,8 @@
SymbolMap Symbols;
UnmaterializedInfosMap UnmaterializedInfos;
MaterializingInfosMap MaterializingInfos;
- FallbackDefinitionGeneratorFunction FallbackDefinitionGenerator;
- JITDylibList SearchOrder;
+ GeneratorFunction DefGenerator;
+ JITDylibSearchList SearchOrder;
};
/// An ExecutionSession represents a running JIT program.
@@ -750,6 +773,10 @@
/// Search the given JITDylib list for the given symbols.
///
+ /// SearchOrder lists the JITDylibs to search. For each dylib, the associated
+ /// boolean indicates whether the search should match against non-exported
+ /// (hidden visibility) symbols in that dylib (true means match against
+ /// non-exported symbols, false means do not match).
///
/// The OnResolve callback will be called once all requested symbols are
/// resolved, or if an error occurs prior to resolution.
@@ -766,7 +793,7 @@
/// dependenant symbols for this query (e.g. it is being made by a top level
/// client to get an address to call) then the value NoDependenciesToRegister
/// can be used.
- void lookup(const JITDylibList &JDs, SymbolNameSet Symbols,
+ void lookup(const JITDylibSearchList &SearchOrder, SymbolNameSet Symbols,
SymbolsResolvedCallback OnResolve, SymbolsReadyCallback OnReady,
RegisterDependenciesFunction RegisterDependencies);
@@ -777,20 +804,29 @@
/// or an error occurs. If WaitUntilReady is false and an error occurs
/// after resolution, the function will return a success value, but the
/// error will be reported via reportErrors.
- Expected<SymbolMap> lookup(const JITDylibList &JDs,
+ Expected<SymbolMap> lookup(const JITDylibSearchList &SearchOrder,
const SymbolNameSet &Symbols,
- RegisterDependenciesFunction RegisterDependencies,
+ RegisterDependenciesFunction RegisterDependencies =
+ NoDependenciesToRegister,
bool WaitUntilReady = true);
- /// Convenience version of the blocking version of lookup above. Uses the main
- /// JITDylib's search order as the lookup order, and registers no
- /// dependencies.
- Expected<SymbolMap> lookup(const SymbolNameSet &Symbols) {
- return getMainJITDylib().withSearchOrderDo(
- [&](const JITDylibList &SearchOrder) {
- return lookup(SearchOrder, Symbols, NoDependenciesToRegister, true);
- });
- }
+ /// Convenience version of blocking lookup.
+ /// Searches each of the JITDylibs in the search order in turn for the given
+ /// symbol.
+ Expected<JITEvaluatedSymbol> lookup(const JITDylibSearchList &SearchOrder,
+ SymbolStringPtr Symbol);
+
+ /// Convenience version of blocking lookup.
+ /// Searches each of the JITDylibs in the search order in turn for the given
+ /// symbol. The search will not find non-exported symbols.
+ Expected<JITEvaluatedSymbol> lookup(ArrayRef<JITDylib *> SearchOrder,
+ SymbolStringPtr Symbol);
+
+ /// Convenience version of blocking lookup.
+ /// Searches each of the JITDylibs in the search order in turn for the given
+ /// symbol. The search will not find non-exported symbols.
+ Expected<JITEvaluatedSymbol> lookup(ArrayRef<JITDylib *> SearchOrder,
+ StringRef Symbol);
/// Materialize the given unit.
void dispatchMaterialization(JITDylib &JD,
@@ -836,7 +872,7 @@
template <typename Func>
auto JITDylib::withSearchOrderDo(Func &&F)
- -> decltype(F(std::declval<const JITDylibList &>())) {
+ -> decltype(F(std::declval<const JITDylibSearchList &>())) {
return ES.runSessionLocked([&]() { return F(SearchOrder); });
}
@@ -873,16 +909,6 @@
});
}
-/// Look up the given names in the given JITDylibs.
-/// JDs will be searched in order and no JITDylib pointer may be null.
-/// All symbols must be found within the given JITDylibs or an error
-/// will be returned.
-Expected<SymbolMap> lookup(const JITDylibList &JDs, SymbolNameSet Names);
-
-/// Look up a symbol by searching a list of JITDylibs.
-Expected<JITEvaluatedSymbol> lookup(const JITDylibList &JDs,
- SymbolStringPtr Name);
-
/// Mangles symbol names then uniques them in the context of an
/// ExecutionSession.
class MangleAndInterner {
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
index 5225066..40dd415 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
@@ -1,9 +1,8 @@
//===- ExecutionUtils.h - Utilities for executing code in Orc ---*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -94,11 +93,11 @@
/// Convenience class for recording constructor/destructor names for
/// later execution.
template <typename JITLayerT>
-class CtorDtorRunner {
+class LegacyCtorDtorRunner {
public:
/// Construct a CtorDtorRunner for the given range using the given
/// name mangling function.
- CtorDtorRunner(std::vector<std::string> CtorDtorNames, VModuleKey K)
+ LegacyCtorDtorRunner(std::vector<std::string> CtorDtorNames, VModuleKey K)
: CtorDtorNames(std::move(CtorDtorNames)), K(K) {}
/// Run the recorded constructors/destructors through the given JIT
@@ -129,9 +128,9 @@
orc::VModuleKey K;
};
-class CtorDtorRunner2 {
+class CtorDtorRunner {
public:
- CtorDtorRunner2(JITDylib &JD) : JD(JD) {}
+ CtorDtorRunner(JITDylib &JD) : JD(JD) {}
void add(iterator_range<CtorDtorIterator> CtorDtors);
Error run();
@@ -177,11 +176,11 @@
void *DSOHandle);
};
-class LocalCXXRuntimeOverrides : public LocalCXXRuntimeOverridesBase {
+class LegacyLocalCXXRuntimeOverrides : public LocalCXXRuntimeOverridesBase {
public:
/// Create a runtime-overrides class.
template <typename MangleFtorT>
- LocalCXXRuntimeOverrides(const MangleFtorT &Mangle) {
+ LegacyLocalCXXRuntimeOverrides(const MangleFtorT &Mangle) {
addOverride(Mangle("__dso_handle"), toTargetAddress(&DSOHandleOverride));
addOverride(Mangle("__cxa_atexit"), toTargetAddress(&CXAAtExitOverride));
}
@@ -202,7 +201,7 @@
StringMap<JITTargetAddress> CXXRuntimeOverrides;
};
-class LocalCXXRuntimeOverrides2 : public LocalCXXRuntimeOverridesBase {
+class LocalCXXRuntimeOverrides : public LocalCXXRuntimeOverridesBase {
public:
Error enable(JITDylib &JD, MangleAndInterner &Mangler);
};
@@ -212,32 +211,30 @@
/// If an instance of this class is attached to a JITDylib as a fallback
/// definition generator, then any symbol found in the given DynamicLibrary that
/// passes the 'Allow' predicate will be added to the JITDylib.
-class DynamicLibraryFallbackGenerator {
+class DynamicLibrarySearchGenerator {
public:
using SymbolPredicate = std::function<bool(SymbolStringPtr)>;
- static bool AllowAll(SymbolStringPtr Name) { return true; }
-
- /// Create a DynamicLibraryFallbackGenerator that searches for symbols in the
+ /// Create a DynamicLibrarySearchGenerator that searches for symbols in the
/// given sys::DynamicLibrary.
- /// Only symbols that match the 'Allow' predicate will be searched for.
- DynamicLibraryFallbackGenerator(sys::DynamicLibrary Dylib,
- const DataLayout &DL,
- SymbolPredicate Allow = AllowAll);
+ /// If the Allow predicate is given then only symbols matching the predicate
+ /// will be searched for in the DynamicLibrary. If the predicate is not given
+ /// then all symbols will be searched for.
+ DynamicLibrarySearchGenerator(sys::DynamicLibrary Dylib, const DataLayout &DL,
+ SymbolPredicate Allow = SymbolPredicate());
/// Permanently loads the library at the given path and, on success, returns
- /// a DynamicLibraryFallbackGenerator that will search it for symbol
- /// definitions matching the Allow predicate.
- /// On failure returns the reason the library failed to load.
- static Expected<DynamicLibraryFallbackGenerator>
+ /// a DynamicLibrarySearchGenerator that will search it for symbol definitions
+ /// in the library. On failure returns the reason the library failed to load.
+ static Expected<DynamicLibrarySearchGenerator>
Load(const char *FileName, const DataLayout &DL,
- SymbolPredicate Allow = AllowAll);
+ SymbolPredicate Allow = SymbolPredicate());
- /// Creates a DynamicLibraryFallbackGenerator that searches for symbols in
+ /// Creates a DynamicLibrarySearchGenerator that searches for symbols in
/// the current process.
- static Expected<DynamicLibraryFallbackGenerator>
- CreateForCurrentProcess(const DataLayout &DL,
- SymbolPredicate Allow = AllowAll) {
+ static Expected<DynamicLibrarySearchGenerator>
+ GetForCurrentProcess(const DataLayout &DL,
+ SymbolPredicate Allow = SymbolPredicate()) {
return Load(nullptr, DL, std::move(Allow));
}
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h
index a8a88d7..a4e43d4 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h
@@ -1,9 +1,8 @@
//===- GlobalMappingLayer.h - Run all IR through a functor ------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
index cb8df26..ecff09b 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
@@ -1,9 +1,8 @@
//===- IRCompileLayer.h -- Eagerly compile IR for JIT -----------*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -28,7 +27,7 @@
namespace orc {
-class IRCompileLayer2 : public IRLayer {
+class IRCompileLayer : public IRLayer {
public:
using CompileFunction =
std::function<Expected<std::unique_ptr<MemoryBuffer>>(Module &)>;
@@ -36,13 +35,12 @@
using NotifyCompiledFunction =
std::function<void(VModuleKey K, ThreadSafeModule TSM)>;
- IRCompileLayer2(ExecutionSession &ES, ObjectLayer &BaseLayer,
- CompileFunction Compile);
+ IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer,
+ CompileFunction Compile);
void setNotifyCompiled(NotifyCompiledFunction NotifyCompiled);
- void emit(MaterializationResponsibility R, VModuleKey K,
- ThreadSafeModule TSM) override;
+ void emit(MaterializationResponsibility R, ThreadSafeModule TSM) override;
private:
mutable std::mutex IRLayerMutex;
@@ -57,15 +55,15 @@
/// object file and adds this module file to the layer below, which must
/// implement the object layer concept.
template <typename BaseLayerT, typename CompileFtor>
-class IRCompileLayer {
+class LegacyIRCompileLayer {
public:
/// Callback type for notifications when modules are compiled.
using NotifyCompiledCallback =
std::function<void(VModuleKey K, std::unique_ptr<Module>)>;
- /// Construct an IRCompileLayer with the given BaseLayer, which must
+ /// Construct an LegacyIRCompileLayer with the given BaseLayer, which must
/// implement the ObjectLayer concept.
- IRCompileLayer(
+ LegacyIRCompileLayer(
BaseLayerT &BaseLayer, CompileFtor Compile,
NotifyCompiledCallback NotifyCompiled = NotifyCompiledCallback())
: BaseLayer(BaseLayer), Compile(std::move(Compile)),
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h
index d5f91ce..8890a57 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h
@@ -1,9 +1,8 @@
//===- IRTransformLayer.h - Run all IR through a functor --------*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -23,20 +22,19 @@
class Module;
namespace orc {
-class IRTransformLayer2 : public IRLayer {
+class IRTransformLayer : public IRLayer {
public:
using TransformFunction = std::function<Expected<ThreadSafeModule>(
ThreadSafeModule, const MaterializationResponsibility &R)>;
- IRTransformLayer2(ExecutionSession &ES, IRLayer &BaseLayer,
- TransformFunction Transform = identityTransform);
+ IRTransformLayer(ExecutionSession &ES, IRLayer &BaseLayer,
+ TransformFunction Transform = identityTransform);
void setTransform(TransformFunction Transform) {
this->Transform = std::move(Transform);
}
- void emit(MaterializationResponsibility R, VModuleKey K,
- ThreadSafeModule TSM) override;
+ void emit(MaterializationResponsibility R, ThreadSafeModule TSM) override;
static ThreadSafeModule
identityTransform(ThreadSafeModule TSM,
@@ -54,11 +52,11 @@
/// This layer applies a user supplied transform to each module that is added,
/// then adds the transformed module to the layer below.
template <typename BaseLayerT, typename TransformFtor>
-class IRTransformLayer {
+class LegacyIRTransformLayer {
public:
- /// Construct an IRTransformLayer with the given BaseLayer
- IRTransformLayer(BaseLayerT &BaseLayer,
+ /// Construct an LegacyIRTransformLayer with the given BaseLayer
+ LegacyIRTransformLayer(BaseLayerT &BaseLayer,
TransformFtor Transform = TransformFtor())
: BaseLayer(BaseLayer), Transform(std::move(Transform)) {}
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
index c252780..2ea9ac1 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
@@ -1,9 +1,8 @@
//===- IndirectionUtils.h - Utilities for adding indirections ---*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
index eb9b6bf..bcbd72e 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
@@ -1,9 +1,8 @@
//===- JITTargetMachineBuilder.h - Build TargetMachines for JIT -*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LLJIT.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LLJIT.h
index 400d4cb..b0ef20d 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LLJIT.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LLJIT.h
@@ -1,9 +1,8 @@
//===----- LLJIT.h -- An ORC-based JIT for compiling LLVM IR ----*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for 3Bdetails.
+// 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
//
//===----------------------------------------------------------------------===//
//
@@ -49,6 +48,11 @@
/// Returns a reference to the JITDylib representing the JIT'd main program.
JITDylib &getMainJITDylib() { return Main; }
+ /// Create a new JITDylib with the given name and return a reference to it.
+ JITDylib &createJITDylib(std::string Name) {
+ return ES->createJITDylib(std::move(Name));
+ }
+
/// Convenience method for defining an absolute symbol.
Error defineAbsolute(StringRef Name, JITEvaluatedSymbol Address);
@@ -99,7 +103,7 @@
Error runDestructors() { return DtorRunner.run(); }
/// Returns a reference to the ObjLinkingLayer
- RTDyldObjectLinkingLayer2 &getObjLinkingLayer() { return ObjLinkingLayer; }
+ RTDyldObjectLinkingLayer &getObjLinkingLayer() { return ObjLinkingLayer; }
protected:
@@ -111,8 +115,6 @@
LLJIT(std::unique_ptr<ExecutionSession> ES, JITTargetMachineBuilder JTMB,
DataLayout DL, unsigned NumCompileThreads);
- std::unique_ptr<RuntimeDyld::MemoryManager> getMemoryManager(VModuleKey K);
-
std::string mangle(StringRef UnmangledName);
Error applyDataLayout(Module &M);
@@ -125,10 +127,10 @@
DataLayout DL;
std::unique_ptr<ThreadPool> CompileThreads;
- RTDyldObjectLinkingLayer2 ObjLinkingLayer;
- IRCompileLayer2 CompileLayer;
+ RTDyldObjectLinkingLayer ObjLinkingLayer;
+ IRCompileLayer CompileLayer;
- CtorDtorRunner2 CtorRunner, DtorRunner;
+ CtorDtorRunner CtorRunner, DtorRunner;
};
/// An extended version of LLJIT that supports lazy function-at-a-time
@@ -141,17 +143,17 @@
/// LLLazyJIT with the given number of compile threads.
static Expected<std::unique_ptr<LLLazyJIT>>
Create(JITTargetMachineBuilder JTMB, DataLayout DL,
- unsigned NumCompileThreads = 0);
+ JITTargetAddress ErrorAddr, unsigned NumCompileThreads = 0);
/// Set an IR transform (e.g. pass manager pipeline) to run on each function
/// when it is compiled.
- void setLazyCompileTransform(IRTransformLayer2::TransformFunction Transform) {
+ void setLazyCompileTransform(IRTransformLayer::TransformFunction Transform) {
TransformLayer.setTransform(std::move(Transform));
}
/// Sets the partition function.
void
- setPartitionFunction(CompileOnDemandLayer2::PartitionFunction Partition) {
+ setPartitionFunction(CompileOnDemandLayer::PartitionFunction Partition) {
CODLayer.setPartitionFunction(std::move(Partition));
}
@@ -180,8 +182,8 @@
std::unique_ptr<LazyCallThroughManager> LCTMgr;
std::function<std::unique_ptr<IndirectStubsManager>()> ISMBuilder;
- IRTransformLayer2 TransformLayer;
- CompileOnDemandLayer2 CODLayer;
+ IRTransformLayer TransformLayer;
+ CompileOnDemandLayer CODLayer;
};
} // End namespace orc
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LambdaResolver.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LambdaResolver.h
index 7b6f3d2..92efded 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LambdaResolver.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LambdaResolver.h
@@ -1,9 +1,8 @@
//===- LambdaResolverMM - Redirect symbol lookup via a functor --*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Layer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Layer.h
index 3bd23ae..8f9bd70 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Layer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Layer.h
@@ -1,9 +1,8 @@
//===---------------- Layer.h -- Layer interfaces --------------*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -49,17 +48,11 @@
/// Adds a MaterializationUnit representing the given IR to the given
/// JITDylib.
- virtual Error add(JITDylib &JD, VModuleKey K, ThreadSafeModule TSM);
-
- /// Adds a MaterializationUnit representing the given IR to the main
- /// JITDylib.
- Error add(VModuleKey K, ThreadSafeModule TSM) {
- return add(ES.getMainJITDylib(), K, std::move(TSM));
- }
+ virtual Error add(JITDylib &JD, ThreadSafeModule TSM,
+ VModuleKey K = VModuleKey());
/// Emit should materialize the given IR.
- virtual void emit(MaterializationResponsibility R, VModuleKey K,
- ThreadSafeModule TSM) = 0;
+ virtual void emit(MaterializationResponsibility R, ThreadSafeModule TSM) = 0;
private:
bool CloneToNewContextOnEmit = false;
@@ -76,14 +69,16 @@
/// Create an IRMaterializationLayer. Scans the module to build the
/// SymbolFlags and SymbolToDefinition maps.
- IRMaterializationUnit(ExecutionSession &ES, ThreadSafeModule TSM);
+ IRMaterializationUnit(ExecutionSession &ES, ThreadSafeModule TSM,
+ VModuleKey K);
/// Create an IRMaterializationLayer from a module, and pre-existing
/// SymbolFlags and SymbolToDefinition maps. The maps must provide
/// entries for each definition in M.
/// This constructor is useful for delegating work from one
/// IRMaterializationUnit to another.
- IRMaterializationUnit(ThreadSafeModule TSM, SymbolFlagsMap SymbolFlags,
+ IRMaterializationUnit(ThreadSafeModule TSM, VModuleKey K,
+ SymbolFlagsMap SymbolFlags,
SymbolNameToDefinitionMap SymbolToDefinition);
/// Return the ModuleIdentifier as the name for this MaterializationUnit.
@@ -125,16 +120,11 @@
/// Adds a MaterializationUnit representing the given IR to the given
/// JITDylib.
- virtual Error add(JITDylib &JD, VModuleKey K, std::unique_ptr<MemoryBuffer> O);
-
- /// Adds a MaterializationUnit representing the given object to the main
- /// JITDylib.
- Error add(VModuleKey K, std::unique_ptr<MemoryBuffer> O) {
- return add(ES.getMainJITDylib(), K, std::move(O));
- }
+ virtual Error add(JITDylib &JD, std::unique_ptr<MemoryBuffer> O,
+ VModuleKey K = VModuleKey());
/// Emit should materialize the given IR.
- virtual void emit(MaterializationResponsibility R, VModuleKey K,
+ virtual void emit(MaterializationResponsibility R,
std::unique_ptr<MemoryBuffer> O) = 0;
private:
@@ -161,7 +151,6 @@
void discard(const JITDylib &JD, const SymbolStringPtr &Name) override;
ObjectLayer &L;
- VModuleKey K;
std::unique_ptr<MemoryBuffer> O;
};
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
index 46761b0..fdf64d0 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
@@ -1,9 +1,8 @@
//===- LazyEmittingLayer.h - Lazily emit IR to lower JIT layers -*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyReexports.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyReexports.h
index 8f89700..9fdd1d1 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyReexports.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/LazyReexports.h
@@ -1,9 +1,8 @@
//===------ LazyReexports.h -- Utilities for lazy reexports -----*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -159,7 +158,8 @@
LazyReexportsMaterializationUnit(LazyCallThroughManager &LCTManager,
IndirectStubsManager &ISManager,
JITDylib &SourceJD,
- SymbolAliasMap CallableAliases);
+ SymbolAliasMap CallableAliases,
+ VModuleKey K);
StringRef getName() const override;
@@ -182,9 +182,10 @@
inline std::unique_ptr<LazyReexportsMaterializationUnit>
lazyReexports(LazyCallThroughManager &LCTManager,
IndirectStubsManager &ISManager, JITDylib &SourceJD,
- SymbolAliasMap CallableAliases) {
+ SymbolAliasMap CallableAliases, VModuleKey K = VModuleKey()) {
return llvm::make_unique<LazyReexportsMaterializationUnit>(
- LCTManager, ISManager, SourceJD, std::move(CallableAliases));
+ LCTManager, ISManager, SourceJD, std::move(CallableAliases),
+ std::move(K));
}
} // End namespace orc
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Legacy.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Legacy.h
index 4c6162a..e0e5526 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Legacy.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/Legacy.h
@@ -1,9 +1,8 @@
//===--- Legacy.h -- Adapters for ExecutionEngine API interop ---*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/NullResolver.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/NullResolver.h
index 03fefb6..ffa37a1 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/NullResolver.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/NullResolver.h
@@ -1,9 +1,8 @@
//===------ NullResolver.h - Reject symbol lookup requests ------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
index c6b43a9..de4603f 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
@@ -1,9 +1,8 @@
//===- ObjectTransformLayer.h - Run all objects through functor -*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -23,16 +22,16 @@
namespace llvm {
namespace orc {
-class ObjectTransformLayer2 : public ObjectLayer {
+class ObjectTransformLayer : public ObjectLayer {
public:
using TransformFunction =
std::function<Expected<std::unique_ptr<MemoryBuffer>>(
std::unique_ptr<MemoryBuffer>)>;
- ObjectTransformLayer2(ExecutionSession &ES, ObjectLayer &BaseLayer,
- TransformFunction Transform);
+ ObjectTransformLayer(ExecutionSession &ES, ObjectLayer &BaseLayer,
+ TransformFunction Transform);
- void emit(MaterializationResponsibility R, VModuleKey K,
+ void emit(MaterializationResponsibility R,
std::unique_ptr<MemoryBuffer> O) override;
private:
@@ -46,11 +45,11 @@
/// immediately applies the user supplied functor to each object, then adds
/// the set of transformed objects to the layer below.
template <typename BaseLayerT, typename TransformFtor>
-class ObjectTransformLayer {
+class LegacyObjectTransformLayer {
public:
/// Construct an ObjectTransformLayer with the given BaseLayer
- ObjectTransformLayer(BaseLayerT &BaseLayer,
- TransformFtor Transform = TransformFtor())
+ LegacyObjectTransformLayer(BaseLayerT &BaseLayer,
+ TransformFtor Transform = TransformFtor())
: BaseLayer(BaseLayer), Transform(std::move(Transform)) {}
/// Apply the transform functor to each object in the object set, then
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcABISupport.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcABISupport.h
index 49e7b53..38246bc 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcABISupport.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcABISupport.h
@@ -1,9 +1,8 @@
//===- OrcABISupport.h - ABI support code -----------------------*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -287,7 +286,7 @@
public:
static const unsigned PointerSize = 8;
static const unsigned TrampolineSize = 40;
- static const unsigned ResolverCodeSize = 0x11C;
+ static const unsigned ResolverCodeSize = 0x120;
using IndirectStubsInfo = GenericIndirectStubsInfo<32>;
using JITReentryFn = JITTargetAddress (*)(void *CallbackMgr,
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcError.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcError.h
index dc60e8d..e5d6a3e 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcError.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcError.h
@@ -1,9 +1,8 @@
//===------ OrcError.h - Reject symbol lookup requests ------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
index 99468e2..8b875b7 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
@@ -1,9 +1,8 @@
//===- OrcRemoteTargetClient.h - Orc Remote-target Client -------*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -118,30 +117,33 @@
Unmapped.back().RemoteCodeAddr =
Client.reserveMem(Id, CodeSize, CodeAlign);
- LLVM_DEBUG(dbgs() << " code: "
- << format("0x%016x", Unmapped.back().RemoteCodeAddr)
- << " (" << CodeSize << " bytes, alignment "
- << CodeAlign << ")\n");
+ LLVM_DEBUG(
+ dbgs() << " code: "
+ << format("0x%016" PRIx64, Unmapped.back().RemoteCodeAddr)
+ << " (" << CodeSize << " bytes, alignment " << CodeAlign
+ << ")\n");
}
if (RODataSize != 0) {
Unmapped.back().RemoteRODataAddr =
Client.reserveMem(Id, RODataSize, RODataAlign);
- LLVM_DEBUG(dbgs() << " ro-data: "
- << format("0x%016x", Unmapped.back().RemoteRODataAddr)
- << " (" << RODataSize << " bytes, alignment "
- << RODataAlign << ")\n");
+ LLVM_DEBUG(
+ dbgs() << " ro-data: "
+ << format("0x%016" PRIx64, Unmapped.back().RemoteRODataAddr)
+ << " (" << RODataSize << " bytes, alignment " << RODataAlign
+ << ")\n");
}
if (RWDataSize != 0) {
Unmapped.back().RemoteRWDataAddr =
Client.reserveMem(Id, RWDataSize, RWDataAlign);
- LLVM_DEBUG(dbgs() << " rw-data: "
- << format("0x%016x", Unmapped.back().RemoteRWDataAddr)
- << " (" << RWDataSize << " bytes, alignment "
- << RWDataAlign << ")\n");
+ LLVM_DEBUG(
+ dbgs() << " rw-data: "
+ << format("0x%016" PRIx64, Unmapped.back().RemoteRWDataAddr)
+ << " (" << RWDataSize << " bytes, alignment " << RWDataAlign
+ << ")\n");
}
}
@@ -269,9 +271,9 @@
for (auto &Alloc : Allocs) {
NextAddr = alignTo(NextAddr, Alloc.getAlign());
Dyld.mapSectionAddress(Alloc.getLocalAddress(), NextAddr);
- LLVM_DEBUG(dbgs() << " "
- << static_cast<void *>(Alloc.getLocalAddress())
- << " -> " << format("0x%016x", NextAddr) << "\n");
+ LLVM_DEBUG(
+ dbgs() << " " << static_cast<void *>(Alloc.getLocalAddress())
+ << " -> " << format("0x%016" PRIx64, NextAddr) << "\n");
Alloc.setRemoteAddress(NextAddr);
// Only advance NextAddr if it was non-null to begin with,
@@ -293,7 +295,7 @@
LLVM_DEBUG(dbgs() << " copying section: "
<< static_cast<void *>(Alloc.getLocalAddress())
<< " -> "
- << format("0x%016x", Alloc.getRemoteAddress())
+ << format("0x%016" PRIx64, Alloc.getRemoteAddress())
<< " (" << Alloc.getSize() << " bytes)\n";);
if (Client.writeMem(Alloc.getRemoteAddress(), Alloc.getLocalAddress(),
@@ -306,7 +308,8 @@
<< (Permissions & sys::Memory::MF_WRITE ? 'W' : '-')
<< (Permissions & sys::Memory::MF_EXEC ? 'X' : '-')
<< " permissions on block: "
- << format("0x%016x", RemoteSegmentAddr) << "\n");
+ << format("0x%016" PRIx64, RemoteSegmentAddr)
+ << "\n");
if (Client.setProtections(Id, RemoteSegmentAddr, Permissions))
return true;
}
@@ -510,8 +513,8 @@
/// Call the int(void) function at the given address in the target and return
/// its result.
Expected<int> callIntVoid(JITTargetAddress Addr) {
- LLVM_DEBUG(dbgs() << "Calling int(*)(void) " << format("0x%016x", Addr)
- << "\n");
+ LLVM_DEBUG(dbgs() << "Calling int(*)(void) "
+ << format("0x%016" PRIx64, Addr) << "\n");
return callB<exec::CallIntVoid>(Addr);
}
@@ -520,15 +523,15 @@
Expected<int> callMain(JITTargetAddress Addr,
const std::vector<std::string> &Args) {
LLVM_DEBUG(dbgs() << "Calling int(*)(int, char*[]) "
- << format("0x%016x", Addr) << "\n");
+ << format("0x%016" PRIx64, Addr) << "\n");
return callB<exec::CallMain>(Addr, Args);
}
/// Call the void() function at the given address in the target and wait for
/// it to finish.
Error callVoidVoid(JITTargetAddress Addr) {
- LLVM_DEBUG(dbgs() << "Calling void(*)(void) " << format("0x%016x", Addr)
- << "\n");
+ LLVM_DEBUG(dbgs() << "Calling void(*)(void) "
+ << format("0x%016" PRIx64, Addr) << "\n");
return callB<exec::CallVoidVoid>(Addr);
}
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h
index 8db9e31..e7b598d 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h
@@ -1,9 +1,8 @@
//===- OrcRemoteTargetRPCAPI.h - Orc Remote-target RPC API ------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
index acbc168..9684481 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
@@ -1,9 +1,8 @@
//===- OrcRemoteTargetServer.h - Orc Remote-target Server -------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCSerialization.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCSerialization.h
index 1e5f6ce..07c7471 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCSerialization.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCSerialization.h
@@ -1,9 +1,8 @@
//===- llvm/ExecutionEngine/Orc/RPCSerialization.h --------------*- 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
//
//===----------------------------------------------------------------------===//
@@ -128,123 +127,85 @@
class RPCTypeName<Expected<T>> {
public:
static const char* getName() {
- std::lock_guard<std::mutex> Lock(NameMutex);
- if (Name.empty())
+ static std::string Name = [] {
+ std::string Name;
raw_string_ostream(Name) << "Expected<"
<< RPCTypeNameSequence<T>()
<< ">";
+ return Name;
+ }();
return Name.data();
}
-
-private:
- static std::mutex NameMutex;
- static std::string Name;
};
-template <typename T>
-std::mutex RPCTypeName<Expected<T>>::NameMutex;
-
-template <typename T>
-std::string RPCTypeName<Expected<T>>::Name;
-
template <typename T1, typename T2>
class RPCTypeName<std::pair<T1, T2>> {
public:
static const char* getName() {
- std::lock_guard<std::mutex> Lock(NameMutex);
- if (Name.empty())
+ static std::string Name = [] {
+ std::string Name;
raw_string_ostream(Name) << "std::pair<" << RPCTypeNameSequence<T1, T2>()
<< ">";
+ return Name;
+ }();
return Name.data();
}
-private:
- static std::mutex NameMutex;
- static std::string Name;
};
-template <typename T1, typename T2>
-std::mutex RPCTypeName<std::pair<T1, T2>>::NameMutex;
-template <typename T1, typename T2>
-std::string RPCTypeName<std::pair<T1, T2>>::Name;
-
template <typename... ArgTs>
class RPCTypeName<std::tuple<ArgTs...>> {
public:
static const char* getName() {
- std::lock_guard<std::mutex> Lock(NameMutex);
- if (Name.empty())
+ static std::string Name = [] {
+ std::string Name;
raw_string_ostream(Name) << "std::tuple<"
<< RPCTypeNameSequence<ArgTs...>() << ">";
+ return Name;
+ }();
return Name.data();
}
-private:
- static std::mutex NameMutex;
- static std::string Name;
};
-template <typename... ArgTs>
-std::mutex RPCTypeName<std::tuple<ArgTs...>>::NameMutex;
-template <typename... ArgTs>
-std::string RPCTypeName<std::tuple<ArgTs...>>::Name;
-
template <typename T>
class RPCTypeName<std::vector<T>> {
public:
static const char*getName() {
- std::lock_guard<std::mutex> Lock(NameMutex);
- if (Name.empty())
+ static std::string Name = [] {
+ std::string Name;
raw_string_ostream(Name) << "std::vector<" << RPCTypeName<T>::getName()
<< ">";
+ return Name;
+ }();
return Name.data();
}
-
-private:
- static std::mutex NameMutex;
- static std::string Name;
};
-template <typename T>
-std::mutex RPCTypeName<std::vector<T>>::NameMutex;
-template <typename T>
-std::string RPCTypeName<std::vector<T>>::Name;
-
template <typename T> class RPCTypeName<std::set<T>> {
public:
static const char *getName() {
- std::lock_guard<std::mutex> Lock(NameMutex);
- if (Name.empty())
+ static std::string Name = [] {
+ std::string Name;
raw_string_ostream(Name)
<< "std::set<" << RPCTypeName<T>::getName() << ">";
+ return Name;
+ }();
return Name.data();
}
-
-private:
- static std::mutex NameMutex;
- static std::string Name;
};
-template <typename T> std::mutex RPCTypeName<std::set<T>>::NameMutex;
-template <typename T> std::string RPCTypeName<std::set<T>>::Name;
-
template <typename K, typename V> class RPCTypeName<std::map<K, V>> {
public:
static const char *getName() {
- std::lock_guard<std::mutex> Lock(NameMutex);
- if (Name.empty())
+ static std::string Name = [] {
+ std::string Name;
raw_string_ostream(Name)
<< "std::map<" << RPCTypeNameSequence<K, V>() << ">";
+ return Name;
+ }();
return Name.data();
}
-
-private:
- static std::mutex NameMutex;
- static std::string Name;
};
-template <typename K, typename V>
-std::mutex RPCTypeName<std::map<K, V>>::NameMutex;
-template <typename K, typename V> std::string RPCTypeName<std::map<K, V>>::Name;
-
/// The SerializationTraits<ChannelT, T> class describes how to serialize and
/// deserialize an instance of type T to/from an abstract channel of type
/// ChannelT. It also provides a representation of the type's name via the
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCUtils.h
index 953b73e..3b11e1b 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCUtils.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RPCUtils.h
@@ -1,9 +1,8 @@
-//===------- RPCUTils.h - Utilities for building RPC APIs -------*- C++ -*-===//
+//===- RPCUtils.h - Utilities for building RPC APIs -------------*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -152,25 +151,17 @@
/// Returns the full function prototype as a string.
static const char *getPrototype() {
- std::lock_guard<std::mutex> Lock(NameMutex);
- if (Name.empty())
+ static std::string Name = [] {
+ std::string Name;
raw_string_ostream(Name)
<< RPCTypeName<RetT>::getName() << " " << DerivedFunc::getName()
<< "(" << llvm::orc::rpc::RPCTypeNameSequence<ArgTs...>() << ")";
+ return Name;
+ }();
return Name.data();
}
-
-private:
- static std::mutex NameMutex;
- static std::string Name;
};
-template <typename DerivedFunc, typename RetT, typename... ArgTs>
-std::mutex Function<DerivedFunc, RetT(ArgTs...)>::NameMutex;
-
-template <typename DerivedFunc, typename RetT, typename... ArgTs>
-std::string Function<DerivedFunc, RetT(ArgTs...)>::Name;
-
/// Allocates RPC function ids during autonegotiation.
/// Specializations of this class must provide four members:
///
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
index 0c30520..cd9ec36 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
@@ -1,9 +1,8 @@
//===- RTDyldObjectLinkingLayer.h - RTDyld-based jit linking ---*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -36,7 +35,7 @@
namespace llvm {
namespace orc {
-class RTDyldObjectLinkingLayer2 : public ObjectLayer {
+class RTDyldObjectLinkingLayer : public ObjectLayer {
public:
/// Functor for receiving object-loaded notifications.
using NotifyLoadedFunction =
@@ -47,17 +46,17 @@
using NotifyEmittedFunction = std::function<void(VModuleKey)>;
using GetMemoryManagerFunction =
- std::function<std::unique_ptr<RuntimeDyld::MemoryManager>(VModuleKey)>;
+ std::function<std::unique_ptr<RuntimeDyld::MemoryManager>()>;
/// Construct an ObjectLinkingLayer with the given NotifyLoaded,
/// and NotifyEmitted functors.
- RTDyldObjectLinkingLayer2(
+ RTDyldObjectLinkingLayer(
ExecutionSession &ES, GetMemoryManagerFunction GetMemoryManager,
NotifyLoadedFunction NotifyLoaded = NotifyLoadedFunction(),
NotifyEmittedFunction NotifyEmitted = NotifyEmittedFunction());
/// Emit the object.
- void emit(MaterializationResponsibility R, VModuleKey K,
+ void emit(MaterializationResponsibility R,
std::unique_ptr<MemoryBuffer> O) override;
/// Set the 'ProcessAllSections' flag.
@@ -66,7 +65,7 @@
/// the memory manager, rather than just the sections required for execution.
///
/// This is kludgy, and may be removed in the future.
- RTDyldObjectLinkingLayer2 &setProcessAllSections(bool ProcessAllSections) {
+ RTDyldObjectLinkingLayer &setProcessAllSections(bool ProcessAllSections) {
this->ProcessAllSections = ProcessAllSections;
return *this;
}
@@ -79,13 +78,13 @@
///
/// FIXME: We should be able to remove this if/when COFF properly tracks
/// exported symbols.
- RTDyldObjectLinkingLayer2 &
+ RTDyldObjectLinkingLayer &
setOverrideObjectFlagsWithResponsibilityFlags(bool OverrideObjectFlags) {
this->OverrideObjectFlags = OverrideObjectFlags;
return *this;
}
- /// If set, this RTDyldObjectLinkingLayer2 instance will claim responsibility
+ /// If set, this RTDyldObjectLinkingLayer instance will claim responsibility
/// for any symbols provided by a given object file that were not already in
/// the MaterializationResponsibility instance. Setting this flag allows
/// higher-level program representations (e.g. LLVM IR) to be added based on
@@ -96,7 +95,7 @@
/// deterministically). If this option is set, clashes for the additional
/// symbols may not be detected until late, and detection may depend on
/// the flow of control through JIT'd code. Use with care.
- RTDyldObjectLinkingLayer2 &
+ RTDyldObjectLinkingLayer &
setAutoClaimResponsibilityForObjectSymbols(bool AutoClaimObjectSymbols) {
this->AutoClaimObjectSymbols = AutoClaimObjectSymbols;
return *this;
@@ -118,10 +117,10 @@
bool ProcessAllSections = false;
bool OverrideObjectFlags = false;
bool AutoClaimObjectSymbols = false;
- std::map<VModuleKey, std::shared_ptr<RuntimeDyld::MemoryManager>> MemMgrs;
+ std::vector<std::unique_ptr<RuntimeDyld::MemoryManager>> MemMgrs;
};
-class RTDyldObjectLinkingLayerBase {
+class LegacyRTDyldObjectLinkingLayerBase {
public:
using ObjectPtr = std::unique_ptr<MemoryBuffer>;
@@ -173,10 +172,10 @@
/// object files to be loaded into memory, linked, and the addresses of their
/// symbols queried. All objects added to this layer can see each other's
/// symbols.
-class RTDyldObjectLinkingLayer : public RTDyldObjectLinkingLayerBase {
+class LegacyRTDyldObjectLinkingLayer : public LegacyRTDyldObjectLinkingLayerBase {
public:
- using RTDyldObjectLinkingLayerBase::ObjectPtr;
+ using LegacyRTDyldObjectLinkingLayerBase::ObjectPtr;
/// Functor for receiving object-loaded notifications.
using NotifyLoadedFtor =
@@ -197,7 +196,7 @@
template <typename MemoryManagerPtrT>
class ConcreteLinkedObject : public LinkedObject {
public:
- ConcreteLinkedObject(RTDyldObjectLinkingLayer &Parent, VModuleKey K,
+ ConcreteLinkedObject(LegacyRTDyldObjectLinkingLayer &Parent, VModuleKey K,
OwnedObject Obj, MemoryManagerPtrT MemMgr,
std::shared_ptr<SymbolResolver> Resolver,
bool ProcessAllSections)
@@ -313,7 +312,7 @@
};
VModuleKey K;
- RTDyldObjectLinkingLayer &Parent;
+ LegacyRTDyldObjectLinkingLayer &Parent;
MemoryManagerPtrT MemMgr;
OwnedObject ObjForNotify;
std::unique_ptr<PreFinalizeContents> PFC;
@@ -321,7 +320,7 @@
template <typename MemoryManagerPtrT>
std::unique_ptr<ConcreteLinkedObject<MemoryManagerPtrT>>
- createLinkedObject(RTDyldObjectLinkingLayer &Parent, VModuleKey K,
+ createLinkedObject(LegacyRTDyldObjectLinkingLayer &Parent, VModuleKey K,
OwnedObject Obj, MemoryManagerPtrT MemMgr,
std::shared_ptr<SymbolResolver> Resolver,
bool ProcessAllSections) {
@@ -341,7 +340,7 @@
/// Construct an ObjectLinkingLayer with the given NotifyLoaded,
/// and NotifyFinalized functors.
- RTDyldObjectLinkingLayer(
+ LegacyRTDyldObjectLinkingLayer(
ExecutionSession &ES, ResourcesGetter GetResources,
NotifyLoadedFtor NotifyLoaded = NotifyLoadedFtor(),
NotifyFinalizedFtor NotifyFinalized = NotifyFinalizedFtor(),
@@ -443,11 +442,14 @@
private:
ExecutionSession &ES;
- std::map<VModuleKey, std::unique_ptr<LinkedObject>> LinkedObjects;
ResourcesGetter GetResources;
NotifyLoadedFtor NotifyLoaded;
NotifyFinalizedFtor NotifyFinalized;
NotifyFreedFtor NotifyFreed;
+
+ // NB! `LinkedObjects` needs to be destroyed before `NotifyFreed` because
+ // `~ConcreteLinkedObject` calls `NotifyFreed`
+ std::map<VModuleKey, std::unique_ptr<LinkedObject>> LinkedObjects;
bool ProcessAllSections = false;
};
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RawByteChannel.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RawByteChannel.h
index db810f4..46b7c59 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RawByteChannel.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RawByteChannel.h
@@ -1,9 +1,8 @@
//===- llvm/ExecutionEngine/Orc/RawByteChannel.h ----------------*- 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
//
//===----------------------------------------------------------------------===//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h
index 955e776..9550edc 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h
@@ -1,9 +1,8 @@
//===------ RemoteObjectLayer.h - Forwards objs to a remote -----*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h
index 4c45cfd..39fa74b 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h
@@ -1,9 +1,8 @@
//===- SymbolStringPool.h - Multi-threaded pool for JIT symbols -*- 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
//
//===----------------------------------------------------------------------===//
//
@@ -14,6 +13,7 @@
#ifndef LLVM_EXECUTIONENGINE_ORC_SYMBOLSTRINGPOOL_H
#define LLVM_EXECUTIONENGINE_ORC_SYMBOLSTRINGPOOL_H
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
#include <atomic>
#include <mutex>
@@ -49,10 +49,13 @@
/// Pointer to a pooled string representing a symbol name.
class SymbolStringPtr {
friend class SymbolStringPool;
+ friend struct DenseMapInfo<SymbolStringPtr>;
friend bool operator==(const SymbolStringPtr &LHS,
const SymbolStringPtr &RHS);
friend bool operator<(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS);
+ static SymbolStringPool::PoolMapEntry Tombstone;
+
public:
SymbolStringPtr() = default;
SymbolStringPtr(const SymbolStringPtr &Other)
@@ -142,6 +145,29 @@
}
} // end namespace orc
+
+template <>
+struct DenseMapInfo<orc::SymbolStringPtr> {
+
+ static orc::SymbolStringPtr getEmptyKey() {
+ return orc::SymbolStringPtr();
+ }
+
+ static orc::SymbolStringPtr getTombstoneKey() {
+ return orc::SymbolStringPtr(&orc::SymbolStringPtr::Tombstone);
+ }
+
+ static unsigned getHashValue(orc::SymbolStringPtr V) {
+ uintptr_t IV = reinterpret_cast<uintptr_t>(V.S);
+ return unsigned(IV) ^ unsigned(IV >> 9);
+ }
+
+ static bool isEqual(const orc::SymbolStringPtr &LHS,
+ const orc::SymbolStringPtr &RHS) {
+ return LHS.S == RHS.S;
+ }
+};
+
} // end namespace llvm
#endif // LLVM_EXECUTIONENGINE_ORC_SYMBOLSTRINGPOOL_H
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
index bf946de..5787500 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
@@ -1,9 +1,8 @@
//===----------- ThreadSafeModule.h -- Layer interfaces ---------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/OrcMCJITReplacement.h b/linux-x64/clang/include/llvm/ExecutionEngine/OrcMCJITReplacement.h
index 4cd5648..6cca193 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/OrcMCJITReplacement.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/OrcMCJITReplacement.h
@@ -1,9 +1,8 @@
//===---- OrcMCJITReplacement.h - Orc-based MCJIT replacement ---*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/RTDyldMemoryManager.h b/linux-x64/clang/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
index 23d651f..c7c87ec 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
@@ -1,9 +1,8 @@
//===-- RTDyldMemoryManager.cpp - Memory manager for MC-JIT -----*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyld.h b/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyld.h
index e419ee0..2af9203 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyld.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyld.h
@@ -1,9 +1,8 @@
//===- RuntimeDyld.h - Run-time dynamic linker for MC-JIT -------*- 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
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyldChecker.h b/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyldChecker.h
index 13fc5fd..ee925c2 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyldChecker.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/RuntimeDyldChecker.h
@@ -1,9 +1,8 @@
//===---- RuntimeDyldChecker.h - RuntimeDyld tester framework -----*- 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
//
//===----------------------------------------------------------------------===//
diff --git a/linux-x64/clang/include/llvm/ExecutionEngine/SectionMemoryManager.h b/linux-x64/clang/include/llvm/ExecutionEngine/SectionMemoryManager.h
index 3cf131c..d731642 100644
--- a/linux-x64/clang/include/llvm/ExecutionEngine/SectionMemoryManager.h
+++ b/linux-x64/clang/include/llvm/ExecutionEngine/SectionMemoryManager.h
@@ -1,9 +1,8 @@
//===- SectionMemoryManager.h - Memory manager for MCJIT/RtDyld -*- 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
//
//===----------------------------------------------------------------------===//
//