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
This commit is contained in:
Chris Lattner 2004-08-12 02:36:50 +00:00
parent c90f2963c4
commit 891150f0b2

View File

@ -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;
}