summaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend
diff options
context:
space:
mode:
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>2011-07-21 20:59:21 +0000
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>2011-07-21 20:59:21 +0000
commita056d201679891adf691f388dce7e56f06106752 (patch)
tree48e55801d34f29f4f7c769f738179f4da54e9c8e /lib/Target/CppBackend
parent10c7d70a4e843b3006db9f5f583d6f6f56cc245e (diff)
downloadllvm-a056d201679891adf691f388dce7e56f06106752.tar.gz
llvm-a056d201679891adf691f388dce7e56f06106752.tar.bz2
llvm-a056d201679891adf691f388dce7e56f06106752.tar.xz
Update generated CPP code with the new API on CallInst::Create and ConstantExpr::getGetElementPtr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index ad33cfa319..cce0fa4a96 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -766,9 +766,7 @@ void CppWriter::printConstant(const Constant *CV) {
Out << "Constant* " << constName
<< " = ConstantExpr::getGetElementPtr("
<< getCppName(CE->getOperand(0)) << ", "
- << "&" << constName << "_indices[0], "
- << constName << "_indices.size()"
- << ");";
+ << constName << "_indices);";
} else if (CE->isCast()) {
printConstant(CE->getOperand(0));
Out << "Constant* " << constName << " = ConstantExpr::getCast(";
@@ -1331,8 +1329,7 @@ void CppWriter::printInstruction(const Instruction *I,
}
Out << "CallInst* " << iName << " = CallInst::Create("
<< opNames[call->getNumArgOperands()] << ", "
- << iName << "_params.begin(), "
- << iName << "_params.end(), \"";
+ << iName << "_params, \"";
} else if (call->getNumArgOperands() == 1) {
Out << "CallInst* " << iName << " = CallInst::Create("
<< opNames[call->getNumArgOperands()] << ", " << opNames[0] << ", \"";