The BlockExtractorPass() constructor was not reading the BlockFile and that was
exactly what bugpoint expected it to do.
There was also only one user of
BlockExtractorPass(const std::vector<BasicBlock*> &B), so just remove it and
make BlockExtractorPass read BlockFile.
This fixes bugpoint's block extraction.
Nick, please review.
llvm-svn: 109936
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index e0f9db6..6913fd0 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -354,8 +354,7 @@
const char *ExtraArg = uniqueFN.c_str();
std::vector<const PassInfo*> PI;
- std::vector<BasicBlock *> EmptyBBs; // This parameter is ignored.
- PI.push_back(getPI(createBlockExtractorPass(EmptyBBs)));
+ PI.push_back(getPI(createBlockExtractorPass()));
Module *Ret = runPassesOn(M, PI, false, 1, &ExtraArg);
uniqueFilename.eraseFromDisk(); // Free disk space