On Mar 7, 2013, at 10:11 AM, Adrian Prantl <[email protected]> wrote: > I think there is a bug in the existing code in lib/CodeGen/Blocks.cpp:1181 > > unsigned align = getContext().getDeclAlign(variable).getQuantity(); > > llvm::AllocaInst *alloca = > CreateMemTemp(variable->getType(), "block.captured-const"); > alloca->setAlignment(align); > > Builder.CreateStore(capture.getConstant(), alloca, align); > > ^^^^^ > > The third argument of IRBuilder::CreateStore() is the “volatile” flag. > http://llvm.org/doxygen/classllvm_1_1IRBuilder.html > > I assume that “align” is usually nonzero — so it would likely output a "store > volatile". Do you think that’s unintentional and it’s safe to replace it with > false? Or is the volatile modifier needed here?
It's probably supposed to be a call to a CreateAlignedStore. The volatility is unintentional. John. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
