diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1')
| -rw-r--r-- | llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h index 91709433d93..a5553f488bb 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h @@ -47,7 +47,6 @@ private: IRCompileLayer<decltype(ObjectLayer), SimpleCompiler> CompileLayer; public: - using ModuleHandle = decltype(CompileLayer)::ModuleHandleT; KaleidoscopeJIT() : ES(SSP), @@ -74,9 +73,11 @@ public: TargetMachine &getTargetMachine() { return *TM; } - ModuleHandle addModule(std::unique_ptr<Module> M) { + VModuleKey addModule(std::unique_ptr<Module> M) { // Add the module to the JIT with a new VModuleKey. - return cantFail(CompileLayer.addModule(ES.allocateVModule(), std::move(M))); + auto K = ES.allocateVModule(); + cantFail(CompileLayer.addModule(K, std::move(M))); + return K; } JITSymbol findSymbol(const std::string Name) { @@ -90,8 +91,8 @@ public: return cantFail(findSymbol(Name).getAddress()); } - void removeModule(ModuleHandle H) { - cantFail(CompileLayer.removeModule(H)); + void removeModule(VModuleKey K) { + cantFail(CompileLayer.removeModule(K)); } }; |

