[opaque pointer type] More GEP API migrations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234108 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2015-04-04 21:07:10 +00:00
parent 166e26c295
commit 0a63904a98
3 changed files with 34 additions and 24 deletions

View File

@ -1568,10 +1568,11 @@ void DFSanVisitor::visitCallSite(CallSite CS) {
ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize);
AllocaInst *VarArgShadow =
new AllocaInst(VarArgArrayTy, "", DFSF.F->getEntryBlock().begin());
Args.push_back(IRB.CreateConstGEP2_32(VarArgShadow, 0, 0));
Args.push_back(IRB.CreateConstGEP2_32(VarArgArrayTy, VarArgShadow, 0, 0));
for (unsigned n = 0; i != e; ++i, ++n) {
IRB.CreateStore(DFSF.getShadow(*i),
IRB.CreateConstGEP2_32(VarArgShadow, 0, n));
IRB.CreateStore(
DFSF.getShadow(*i),
IRB.CreateConstGEP2_32(VarArgArrayTy, VarArgShadow, 0, n));
Args.push_back(*i);
}
}