[PATCH] D31042: Allow DataLayout to specify addrspace for allocas.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 16:10:14 PDT 2017
efriedma added inline comments.
================
Comment at: include/llvm/IR/IRBuilder.h:1098
+ AllocaInst *CreateAlloca(const DataLayout &DL, Type *Ty,
+ Value *ArraySize = nullptr, const Twine &Name = "") {
+ return Insert(new AllocaInst(Ty, DL.getStackAddrSpace(), ArraySize), Name);
----------------
I'm not sure this overload is a good idea; it saves a little typing, but it hides the reason we need the datalayout.
https://reviews.llvm.org/D31042
More information about the llvm-commits
mailing list