aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-upgrade
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2007-09-04 15:46:09 +0000
committerDavid Greene <greened@obbligato.org>2007-09-04 15:46:09 +0000
commitb8f74793b9d161bc666fe27fc92fe112b6ec169b (patch)
tree3e79ac89138858c59c1f73af09b64527778ad944 /tools/llvm-upgrade
parent382526239944023e435833ce759f536fec4e6225 (diff)
downloadexternal_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/llvm-upgrade')
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index 5893fcd..9cc1af2 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/tools/llvm-upgrade/UpgradeParser.y
@@ -1533,8 +1533,8 @@ const Type* upgradeGEPCEIndices(const Type* PTy,
}
}
Result.push_back(Index);
- Ty = GetElementPtrInst::getIndexedType(PTy, (Value**)&Result[0],
- Result.size(),true);
+ Ty = GetElementPtrInst::getIndexedType(PTy, Result.begin(),
+ Result.end(),true);
if (!Ty)
error("Index list invalid for constant getelementptr");
}
@@ -1579,7 +1579,8 @@ const Type* upgradeGEPInstIndices(const Type* PTy,
}
}
Result.push_back(Index);
- Ty = GetElementPtrInst::getIndexedType(PTy, &Result[0], Result.size(),true);
+ Ty = GetElementPtrInst::getIndexedType(PTy, Result.begin(),
+ Result.end(),true);
if (!Ty)
error("Index list invalid for constant getelementptr");
}
@@ -3890,7 +3891,7 @@ MemoryInst
upgradeGEPInstIndices(Ty, $4, VIndices);
Value* tmpVal = getVal(Ty, $3);
- $$.I = new GetElementPtrInst(tmpVal, &VIndices[0], VIndices.size());
+ $$.I = new GetElementPtrInst(tmpVal, VIndices.begin(), VIndices.end());
ValueInfo VI; VI.V = tmpVal; VI.S.copy($2.S);
$$.S.copy(getElementSign(VI, VIndices));
delete $2.PAT;