diff options
author | David Greene <greened@obbligato.org> | 2007-09-04 15:46:09 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2007-09-04 15:46:09 +0000 |
commit | b8f74793b9d161bc666fe27fc92fe112b6ec169b (patch) | |
tree | 3e79ac89138858c59c1f73af09b64527778ad944 /tools/llvm2cpp | |
parent | 382526239944023e435833ce759f536fec4e6225 (diff) | |
download | external_llvm-b8f74793b9d161bc666fe27fc92fe112b6ec169b.zip external_llvm-b8f74793b9d161bc666fe27fc92fe112b6ec169b.tar.gz external_llvm-b8f74793b9d161bc666fe27fc92fe112b6ec169b.tar.bz2 |
Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp')
-rw-r--r-- | tools/llvm2cpp/CppWriter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index 99d79de..a481372 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -787,7 +787,8 @@ void CppWriter::printConstant(const Constant *CV) { Out << "Constant* " << constName << " = ConstantExpr::getGetElementPtr(" << getCppName(CE->getOperand(0)) << ", " - << "&" << constName << "_indices[0], " << CE->getNumOperands() - 1 + << constName << "_indices.begin(), " + << constName << "_indices.end(), " << " );"; } else if (CE->isCast()) { printConstant(CE->getOperand(0)); @@ -1253,8 +1254,8 @@ CppWriter::printInstruction(const Instruction *I, const std::string& bbname) { nl(Out); } Out << "Instruction* " << iName << " = new GetElementPtrInst(" - << opNames[0] << ", &" << iName << "_indices[0], " - << gep->getNumOperands() - 1; + << opNames[0] << ", " << iName << "_indices.begin(), " + << iName << "_indices.end()"; } Out << ", \""; printEscapedString(gep->getName()); |