aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/bugpoint/ExtractFunction.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index ecc2652..7806857 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/tools/bugpoint/ExtractFunction.cpp
@@ -262,7 +262,11 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const
PI.push_back(getPI(new BlockExtractorPass()));
Module *Ret = runPassesOn(M, PI);
BlocksToNotExtract.clear();
- if (Ret == 0)
+ if (Ret == 0) {
std::cout << "*** Basic Block extraction failed, please report a bug!\n";
+ M = swapProgramIn(M);
+ EmitProgressBytecode("basicblockextractfail", true);
+ M = swapProgramIn(M);
+ }
return Ret;
}