aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y5
-rw-r--r--tools/llvm2cpp/CppWriter.cpp3
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index 251cc77..5893fcd 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/tools/llvm-upgrade/UpgradeParser.y
@@ -3342,7 +3342,8 @@ BBTerminatorInst
// Create the call node...
if (!$6) { // Has no arguments?
- $$.TI = new InvokeInst(V, Normal, Except, 0, 0);
+ std::vector<Value*> Args;
+ $$.TI = new InvokeInst(V, Normal, Except, Args.begin(), Args.end());
} else { // Has arguments?
// Loop through FunctionType's arguments and ensure they are specified
// correctly!
@@ -3362,7 +3363,7 @@ BBTerminatorInst
if (I != E || (ArgI != ArgE && !Ty->isVarArg()))
error("Invalid number of parameters detected");
- $$.TI = new InvokeInst(V, Normal, Except, &Args[0], Args.size());
+ $$.TI = new InvokeInst(V, Normal, Except, Args.begin(), Args.end());
}
cast<InvokeInst>($$.TI)->setCallingConv(upgradeCallingConv($2));
delete $3.PAT;
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp
index 1cba757..99d79de 100644
--- a/tools/llvm2cpp/CppWriter.cpp
+++ b/tools/llvm2cpp/CppWriter.cpp
@@ -1083,8 +1083,7 @@ CppWriter::printInstruction(const Instruction *I, const std::string& bbname) {
<< opNames[0] << ", "
<< opNames[1] << ", "
<< opNames[2] << ", "
- << "&" << iName << "_params[0], " << inv->getNumOperands() - 3
- << ", \"";
+ << iName << "_params.begin(), " << iName << "_params.end(), \"";
printEscapedString(inv->getName());
Out << "\", " << bbname << ");";
nl(Out) << iName << "->setCallingConv(";