[opaque pointer type] The last of the GEP IRBuilder API migrations

There's still lots of callers passing nullptr, of course - some because
they'll never be migrated (InstCombines for bitcasts - well they don't
make any sense when the pointer type is opaque anyway, for example) and
others that will need more engineering to pass Types around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2015-04-05 22:41:44 +00:00
parent 7368f2145a
commit 7b0e5b8edc
3 changed files with 16 additions and 10 deletions

View File

@ -1472,17 +1472,16 @@ void DFSanVisitor::visitCallSite(CallSite CS) {
Args.push_back(DFSF.getShadow(*i));
if (FT->isVarArg()) {
auto LabelVAAlloca =
new AllocaInst(ArrayType::get(DFSF.DFS.ShadowTy,
CS.arg_size() - FT->getNumParams()),
"labelva", DFSF.F->getEntryBlock().begin());
auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy, CS.arg_size() - FT->getNumParams());
auto *LabelVAAlloca = new AllocaInst(LabelVATy, "labelva",
DFSF.F->getEntryBlock().begin());
for (unsigned n = 0; i != CS.arg_end(); ++i, ++n) {
auto LabelVAPtr = IRB.CreateStructGEP(LabelVAAlloca, n);
auto LabelVAPtr = IRB.CreateStructGEP(LabelVATy, LabelVAAlloca, n);
IRB.CreateStore(DFSF.getShadow(*i), LabelVAPtr);
}
Args.push_back(IRB.CreateStructGEP(LabelVAAlloca, 0));
Args.push_back(IRB.CreateStructGEP(LabelVATy, LabelVAAlloca, 0));
}
if (!FT->getReturnType()->isVoidTy()) {