From 7aa26b64708e6c766a18fe32c46dfa99105dcc20 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 31 Jul 2010 00:32:17 +0000 Subject: 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 &B), so just remove it and make BlockExtractorPass read BlockFile. This fixes bugpoint's block extraction. Nick, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109936 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/LoopExtractor.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/Transforms') diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp index fa8eb5e..fd60adf 100644 --- a/lib/Transforms/IPO/LoopExtractor.cpp +++ b/lib/Transforms/IPO/LoopExtractor.cpp @@ -147,12 +147,10 @@ namespace { std::vector > BlocksToNotExtractByName; public: static char ID; // Pass identification, replacement for typeid - explicit BlockExtractorPass(const std::vector &B) - : ModulePass(&ID), BlocksToNotExtract(B) { + BlockExtractorPass() : ModulePass(&ID) { if (!BlockFile.empty()) LoadFile(BlockFile.c_str()); } - BlockExtractorPass() : ModulePass(&ID) {} bool runOnModule(Module &M); }; @@ -166,9 +164,9 @@ INITIALIZE_PASS(BlockExtractorPass, "extract-blocks", // createBlockExtractorPass - This pass extracts all blocks (except those // specified in the argument list) from the functions in the module. // -ModulePass *llvm::createBlockExtractorPass(const std::vector &BTNE) +ModulePass *llvm::createBlockExtractorPass() { - return new BlockExtractorPass(BTNE); + return new BlockExtractorPass(); } void BlockExtractorPass::LoadFile(const char *Filename) { -- cgit v1.1