aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine/Orc/LambdaResolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ExecutionEngine/Orc/LambdaResolver.h')
-rw-r--r--include/llvm/ExecutionEngine/Orc/LambdaResolver.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/include/llvm/ExecutionEngine/Orc/LambdaResolver.h b/include/llvm/ExecutionEngine/Orc/LambdaResolver.h
index 7b6f3d2f92ab..855e31b33549 100644
--- a/include/llvm/ExecutionEngine/Orc/LambdaResolver.h
+++ b/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
//
//===----------------------------------------------------------------------===//
//
@@ -25,7 +24,15 @@ namespace orc {
template <typename DylibLookupFtorT, typename ExternalLookupFtorT>
class LambdaResolver : public LegacyJITSymbolResolver {
public:
- LambdaResolver(DylibLookupFtorT DylibLookupFtor,
+ LLVM_ATTRIBUTE_DEPRECATED(
+ LambdaResolver(DylibLookupFtorT DylibLookupFtor,
+ ExternalLookupFtorT ExternalLookupFtor),
+ "ORCv1 utilities (including resolvers) are deprecated and will be "
+ "removed "
+ "in the next release. Please use ORCv2 (see docs/ORCv2.rst)");
+
+ LambdaResolver(ORCv1DeprecationAcknowledgement,
+ DylibLookupFtorT DylibLookupFtor,
ExternalLookupFtorT ExternalLookupFtor)
: DylibLookupFtor(DylibLookupFtor),
ExternalLookupFtor(ExternalLookupFtor) {}
@@ -43,6 +50,12 @@ private:
ExternalLookupFtorT ExternalLookupFtor;
};
+template <typename DylibLookupFtorT, typename ExternalLookupFtorT>
+LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT>::LambdaResolver(
+ DylibLookupFtorT DylibLookupFtor, ExternalLookupFtorT ExternalLookupFtor)
+ : DylibLookupFtor(DylibLookupFtor), ExternalLookupFtor(ExternalLookupFtor) {
+}
+
template <typename DylibLookupFtorT,
typename ExternalLookupFtorT>
std::shared_ptr<LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT>>
@@ -53,6 +66,17 @@ createLambdaResolver(DylibLookupFtorT DylibLookupFtor,
std::move(ExternalLookupFtor));
}
+template <typename DylibLookupFtorT, typename ExternalLookupFtorT>
+std::shared_ptr<LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT>>
+createLambdaResolver(ORCv1DeprecationAcknowledgement,
+ DylibLookupFtorT DylibLookupFtor,
+ ExternalLookupFtorT ExternalLookupFtor) {
+ using LR = LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT>;
+ return make_unique<LR>(AcknowledgeORCv1Deprecation,
+ std::move(DylibLookupFtor),
+ std::move(ExternalLookupFtor));
+}
+
} // end namespace orc
} // end namespace llvm