summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-09-10 22:08:57 +0000
committerLang Hames <lhames@gmail.com>2018-09-10 22:08:57 +0000
commit7c4814306d8a1460b28e9042d95697eadf3e8df0 (patch)
tree854e565003ee50d11215303996657acc11abe1cc /llvm/lib
parent33428d98f7ffb26d98e3af3d28e7215e31bc1b69 (diff)
downloadbcm5719-llvm-7c4814306d8a1460b28e9042d95697eadf3e8df0.tar.gz
bcm5719-llvm-7c4814306d8a1460b28e9042d95697eadf3e8df0.zip
[ORC] Simplify LLJIT::Create by removing the ExecutionSession parameter.
The Create method can just construct the ExecutionSession, rather than having the client pass it in. llvm-svn: 341872
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/LLJIT.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
index b463771c730..464b1e2413a 100644
--- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -16,10 +16,9 @@ namespace llvm {
namespace orc {
Expected<std::unique_ptr<LLJIT>>
-LLJIT::Create(std::unique_ptr<ExecutionSession> ES,
- std::unique_ptr<TargetMachine> TM, DataLayout DL) {
- return std::unique_ptr<LLJIT>(
- new LLJIT(std::move(ES), std::move(TM), std::move(DL)));
+LLJIT::Create(std::unique_ptr<TargetMachine> TM, DataLayout DL) {
+ return std::unique_ptr<LLJIT>(new LLJIT(llvm::make_unique<ExecutionSession>(),
+ std::move(TM), std::move(DL)));
}
Error LLJIT::defineAbsolute(StringRef Name, JITEvaluatedSymbol Sym) {
@@ -91,9 +90,10 @@ void LLJIT::recordCtorDtors(Module &M) {
}
Expected<std::unique_ptr<LLLazyJIT>>
-LLLazyJIT::Create(std::unique_ptr<ExecutionSession> ES,
- std::unique_ptr<TargetMachine> TM, DataLayout DL,
+LLLazyJIT::Create(std::unique_ptr<TargetMachine> TM, DataLayout DL,
LLVMContext &Ctx) {
+ auto ES = llvm::make_unique<ExecutionSession>();
+
const Triple &TT = TM->getTargetTriple();
auto CCMgr = createLocalCompileCallbackManager(TT, *ES, 0);
OpenPOWER on IntegriCloud