[LLVMdev] Alloca with LLVMContext

Jeffrey Yasskin jyasskin at google.com
Wed Jul 15 10:06:35 PDT 2009

On Wed, Jul 15, 2009 at 8:52 AM, Owen Anderson<resistor at mac.com> wrote:
> On Jul 15, 2009, at 8:14 AM, John Criswell wrote:
> Dear All,
> Is there a reason why the AllocaInst constructor takes an LLVMContext
> argument?  Can't it just determine the context from either the basic
> block or instruction pointer argument?
> BasicBlocks and Instructions don't necessarily have contexts, if they're not
> attached to a module.  You can also construct an AllocaInst without
> attaching it to a BasicBlock.

I must have missed something. I think you've said that all Types will
have a Context, in which case the AllocaInst could pull the context
from its type.


More information about the llvm-dev mailing list