aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine/Orc
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ExecutionEngine/Orc')
-rw-r--r--include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h b/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
index 6c951fab6185..b7e462e85d9d 100644
--- a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
+++ b/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.