summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 5f17c65cb26..2a4bb8c26e9 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -140,10 +140,7 @@ bool opt(Config &C, TargetMachine *TM, unsigned Task, Module &M,
bool IsThinLto) {
M.setDataLayout(TM->createDataLayout());
runOldPMPasses(C, M, TM, IsThinLto);
- if (C.PostOptModuleHook && !C.PostOptModuleHook(Task, M))
- return false;
-
- return true;
+ return !C.PostOptModuleHook || C.PostOptModuleHook(Task, M);
}
/// Monolithic LTO does not support caching (yet), this is a convenient wrapper
OpenPOWER on IntegriCloud