From 8a6bab78f68fefaa5fb422bd411c9dfad03ec320 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sun, 3 Sep 2017 00:50:42 +0000 Subject: [ORC] Add an Error return to the JITCompileCallbackManager::grow method. Calling grow may result in an error if, for example, this is a callback manager for a remote target. We need to be able to return this error to the callee. llvm-svn: 312429 --- llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h | 2 +- llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/examples') diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index d10e4748f1a..841ea74fb98 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -135,7 +135,7 @@ public: Error addFunctionAST(std::unique_ptr FnAST) { // Create a CompileCallback - this is the re-entry point into the compiler // for functions that haven't been compiled yet. - auto CCInfo = CompileCallbackMgr->getCompileCallback(); + auto CCInfo = cantFail(CompileCallbackMgr->getCompileCallback()); // Create an indirect stub. This serves as the functions "canonical // definition" - an unchanging (constant address) entry point to the diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h index 7ea535b3af5..d3183140d23 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h @@ -164,7 +164,7 @@ public: Error addFunctionAST(std::unique_ptr FnAST) { // Create a CompileCallback - this is the re-entry point into the compiler // for functions that haven't been compiled yet. - auto CCInfo = CompileCallbackMgr->getCompileCallback(); + auto CCInfo = cantFail(CompileCallbackMgr->getCompileCallback()); // Create an indirect stub. This serves as the functions "canonical // definition" - an unchanging (constant address) entry point to the -- cgit v1.2.3