From 891150f0b2a124a75c9f31516182ce864ae69ef8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 12 Aug 2004 02:36:50 +0000 Subject: [PATCH] If the block extractor fails, actually emit the bc file that failed to extract git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15675 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/bugpoint/ExtractFunction.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index ecc2652556e..7806857f2ef 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; }