New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.
Updates to all clients.
llvm-svn: 40660
diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
index aaf9986..90642f1 100644
--- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp
+++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
@@ -393,7 +393,7 @@
}
// Emit the call to the function
- CallInst *call = new CallInst(newFunction, ¶ms[0], params.size(),
+ CallInst *call = new CallInst(newFunction, params.begin(), params.end(),
NumExitBlocks > 1 ? "targetBlock" : "");
codeReplacer->getInstList().push_back(call);