diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-08-02 03:30:26 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-08-02 03:30:26 +0000 |
commit | 22256f482d4a5e60e113fc509734d5714539fbd4 (patch) | |
tree | 7451ded3ec771abf769ea7d7d5044fbc995b17b9 /tools/llvm2cpp | |
parent | 335f4f77882ace48bcdfb7a6019367bf9f4857cd (diff) | |
download | external_llvm-22256f482d4a5e60e113fc509734d5714539fbd4.zip external_llvm-22256f482d4a5e60e113fc509734d5714539fbd4.tar.gz external_llvm-22256f482d4a5e60e113fc509734d5714539fbd4.tar.bz2 |
Adjust for new CallInst constructor interface.
This fixes test/Feature/llvm2cpp.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp')
-rw-r--r-- | tools/llvm2cpp/CppWriter.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index b1ba001..1cba757 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -1325,7 +1325,7 @@ CppWriter::printInstruction(const Instruction *I, const std::string& bbname) { << (ila->hasSideEffects() ? "true" : "false") << ");"; nl(Out); } - if (call->getNumOperands() > 3) { + if (call->getNumOperands() > 2) { Out << "std::vector<Value*> " << iName << "_params;"; nl(Out); for (unsigned i = 1; i < call->getNumOperands(); ++i) { @@ -1333,11 +1333,8 @@ CppWriter::printInstruction(const Instruction *I, const std::string& bbname) { nl(Out); } Out << "CallInst* " << iName << " = new CallInst(" - << opNames[0] << ", &" << iName << "_params[0], " - << call->getNumOperands() - 1 << ", \""; - } else if (call->getNumOperands() == 3) { - Out << "CallInst* " << iName << " = new CallInst(" - << opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", \""; + << opNames[0] << ", " << iName << "_params.begin(), " + << iName << "_params.end(), \""; } else if (call->getNumOperands() == 2) { Out << "CallInst* " << iName << " = new CallInst(" << opNames[0] << ", " << opNames[1] << ", \""; |