diff options
| author | Frederich Munch <colsebas@hotmail.com> | 2017-08-15 02:25:36 +0000 |
|---|---|---|
| committer | Frederich Munch <colsebas@hotmail.com> | 2017-08-15 02:25:36 +0000 |
| commit | 7a3da86823fb4bea6c80f9d7f972b3dc944acf19 (patch) | |
| tree | 105fd45533974d0664147fd4061a4cdb530d64f4 | |
| parent | fdb3df65b6844c5926b1cb950fa044ce3017a7b1 (diff) | |
| download | bcm5719-llvm-7a3da86823fb4bea6c80f9d7f972b3dc944acf19.tar.gz bcm5719-llvm-7a3da86823fb4bea6c80f9d7f972b3dc944acf19.zip | |
Propagate error in LazyEmittingLayer::removeModule.
Summary:
Besides being the better thing to do, not doing so will triggers an assert with LLVM_ENABLE_ABI_BREAKING_CHECKS.
Reviewers: lhames
Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36700
llvm-svn: 310906
| -rw-r--r-- | llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h index 6c951fab618..b7e462e85d9 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h @@ -94,9 +94,9 @@ private: llvm_unreachable("Invalid emit-state."); } - void removeModuleFromBaseLayer(BaseLayerT &BaseLayer) { - if (EmitState != NotEmitted) - BaseLayer.removeModule(Handle); + Error removeModuleFromBaseLayer(BaseLayerT& BaseLayer) { + return EmitState != NotEmitted ? BaseLayer.removeModule(Handle) + : Error::success(); } void emitAndFinalize(BaseLayerT &BaseLayer) { @@ -226,9 +226,9 @@ public: /// This method will free the memory associated with the given module, both /// in this layer, and the base layer. Error removeModule(ModuleHandleT H) { - (*H)->removeModuleFromBaseLayer(BaseLayer); + Error Err = (*H)->removeModuleFromBaseLayer(BaseLayer); ModuleList.erase(H); - return Error::success(); + return Err; } /// @brief Search for the given named symbol. |

