[llvm-commits] [llvm] r135704 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Thu Jul 21 13:59:21 PDT 2011


Author: geoffray
Date: Thu Jul 21 15:59:21 2011
New Revision: 135704

URL: http://llvm.org/viewvc/llvm-project?rev=135704&view=rev
Log:
Update generated CPP code with the new API on CallInst::Create and ConstantExpr::getGetElementPtr.


Modified:
    llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp

Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=135704&r1=135703&r2=135704&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Thu Jul 21 15:59:21 2011
@@ -766,9 +766,7 @@
       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 @@
       }
       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] << ", \"";





More information about the llvm-commits mailing list