summaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-08-20 21:02:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-08-20 21:02:43 +0000
commit15c5c77fa04cd97e1057e8a585f669fc49da0d92 (patch)
tree9047e00a30ccb7b81dbe7227c8c883cbafb5d2dd /include/llvm/ExecutionEngine
parent4e20bb0468b8d0db13287e666b482eb93689be99 (diff)
Diffstat (limited to 'include/llvm/ExecutionEngine')
-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 6c951fab61855..b7e462e85d9dc 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.