summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/LoopExtractor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/IPO/LoopExtractor.cpp')
-rw-r--r--lib/Transforms/IPO/LoopExtractor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp
index 5a6e7671d1..7169b503b2 100644
--- a/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/lib/Transforms/IPO/LoopExtractor.cpp
@@ -167,7 +167,8 @@ bool BlockExtractorPass::runOnModule(Module &M) {
Function *F = BB->getParent();
// Map the corresponding function in this module.
- Function *MF = M.getFunction(F->getName(), F->getFunctionType());
+ Function *MF = M.getFunction(F->getName());
+ assert(MF->getFunctionType() == F->getFunctionType() && "Wrong function?");
// Figure out which index the basic block is in its function.
Function::iterator BBI = MF->begin();