[llvm] r242170 - Avoid MSVC-incompatible use of init list.

David Blaikie dblaikie at gmail.com
Tue Jul 14 13:28:59 PDT 2015


On Tue, Jul 14, 2015 at 11:21 AM, Pete Cooper <peter_cooper at apple.com>
wrote:

> Out of curiosity, are init lists unsupported anywhere on MSVC, or just in
> argument defaults?  Just want to make sure I don’t commit something
> unsupported in future.
>

Not sure, but it doesn't seem to be "everywhere" - check the corresponding
Clang change where callers were already successfully passing "{}" for this
argument (& the change just drops that argument) (& all the other
CreateCall sites are using {A, B, C], etc... )


>
> Pete
> > On Jul 14, 2015, at 10:40 AM, David Blaikie <dblaikie at gmail.com> wrote:
> >
> > Author: dblaikie
> > Date: Tue Jul 14 12:40:53 2015
> > New Revision: 242170
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=242170&view=rev
> > Log:
> > Avoid MSVC-incompatible use of init list.
> >
> > Modified:
> >    llvm/trunk/include/llvm/IR/IRBuilder.h
> >
> > Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=242170&r1=242169&r2=242170&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
> > +++ llvm/trunk/include/llvm/IR/IRBuilder.h Tue Jul 14 12:40:53 2015
> > @@ -1464,7 +1464,7 @@ public:
> >     return Insert(PHINode::Create(Ty, NumReservedValues), Name);
> >   }
> >
> > -  CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args = {},
> > +  CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args = None,
> >                        const Twine &Name = "") {
> >     return Insert(CallInst::Create(Callee, Args), Name);
> >   }
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150714/4eda3238/attachment.html>


More information about the llvm-commits mailing list