diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4')
| -rw-r--r-- | llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index a95efd4ba82..1fa169b8b13 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -89,7 +89,6 @@ private: std::unique_ptr<IndirectStubsManager> IndirectStubsMgr; public: - using ModuleHandle = decltype(OptimizeLayer)::ModuleHandleT; KaleidoscopeJIT() : ES(SSP), @@ -127,10 +126,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( - OptimizeLayer.addModule(ES.allocateVModule(), std::move(M))); + auto K = ES.allocateVModule(); + cantFail(OptimizeLayer.addModule(K, std::move(M))); + return K; } Error addFunctionAST(std::unique_ptr<FunctionAST> FnAST) { @@ -195,8 +195,8 @@ public: return OptimizeLayer.findSymbol(mangle(Name), true); } - void removeModule(ModuleHandle H) { - cantFail(OptimizeLayer.removeModule(H)); + void removeModule(VModuleKey K) { + cantFail(OptimizeLayer.removeModule(K)); } private: |

