[llvm-commits] [llvm] r165922 - /llvm/trunk/include/llvm/Attributes.h

David Blaikie dblaikie at gmail.com
Mon Oct 15 08:16:01 PDT 2012


On Sun, Oct 14, 2012 at 11:34 PM, Bill Wendling <isanbard at gmail.com> wrote:
> Author: void
> Date: Mon Oct 15 01:34:18 2012
> New Revision: 165922
>
> URL: http://llvm.org/viewvc/llvm-project?rev=165922&view=rev
> Log:
> Supply a default 'operator=' method.
>
> Modified:
>     llvm/trunk/include/llvm/Attributes.h
>
> Modified: llvm/trunk/include/llvm/Attributes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=165922&r1=165921&r2=165922&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Attributes.h (original)
> +++ llvm/trunk/include/llvm/Attributes.h Mon Oct 15 01:34:18 2012
> @@ -95,6 +95,10 @@
>    Attributes() : Attrs(0) {}
>    explicit Attributes(LLVMContext &C, ArrayRef<AttrVal> Vals);
>    Attributes(const Attributes &A);
> +  Attributes &operator=(const Attributes &A) {
> +    Attrs = A.Attrs;
> +    return *this;
> +  }

Is there a reason the implicit copy assignment operator wasn't
working/suitable here?

>
>    class Builder {
>      friend class Attributes;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list