aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm2cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm2cpp')
-rw-r--r--tools/llvm2cpp/CppWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp
index 077333956a..0b7b0eea00 100644
--- a/tools/llvm2cpp/CppWriter.cpp
+++ b/tools/llvm2cpp/CppWriter.cpp
@@ -787,8 +787,8 @@ void CppWriter::printConstant(const Constant *CV) {
Out << "Constant* " << constName
<< " = ConstantExpr::getGetElementPtr("
<< getCppName(CE->getOperand(0)) << ", "
- << constName << "_indices.begin(), "
- << constName << "_indices.end()"
+ << "&" << constName << "_indices[0], "
+ << constName << "_indices.size()"
<< " );";
} else if (CE->isCast()) {
printConstant(CE->getOperand(0));