[llvm] r242170 - Avoid MSVC-incompatible use of init list.
Pete Cooper
peter_cooper at apple.com
Tue Jul 14 13:39:29 PDT 2015
> On Jul 14, 2015, at 1:28 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
>
> On Tue, Jul 14, 2015 at 11:21 AM, Pete Cooper <peter_cooper at apple.com <mailto: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… )
Hmm, interesting. I think the word ‘inconsistent’ springs to mind :)
Thanks for the answer. For now i’m going to assume that using them as default arguments is bad for some strange reason.
Pete
>
>
> Pete
> > On Jul 14, 2015, at 10:40 AM, David Blaikie <dblaikie at gmail.com <mailto: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 <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 <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 <mailto:llvm-commits at cs.uiuc.edu>
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <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/91802378/attachment.html>
More information about the llvm-commits
mailing list