Update generated CPP code with the new API on CallInst::Create and ConstantExpr:...
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>
Thu, 21 Jul 2011 20:59:21 +0000 (20:59 +0000)
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>
Thu, 21 Jul 2011 20:59:21 +0000 (20:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135704 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CppBackend/CPPBackend.cpp

index ad33cfa319645b67dcf8be36a73b52d782f6dd17..cce0fa4a96539ed362fc73c17b71ba126fcde63f 100644 (file)
@@ -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] << ", \"";