[llvm] r214178 - UseListShuffleVector: Add a copy constructor to appease msc17.

David Blaikie dblaikie at gmail.com
Tue Jul 29 09:57:48 PDT 2014


On Tue, Jul 29, 2014 at 5:20 AM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> Author: chapuni
> Date: Tue Jul 29 07:20:50 2014
> New Revision: 214178
>
> URL: http://llvm.org/viewvc/llvm-project?rev=214178&view=rev
> Log:
> UseListShuffleVector: Add a copy constructor to appease msc17.

Could you mention/describe where copy operations were required? It
might be worth fixing that (& if it just needs to /see/ a declaration
but never call it, it could be declared-but-not-defined)

In any case, the patch itself is under some question, so no need to
fuss about this just yet.

>
> Modified:
>     llvm/trunk/include/llvm/IR/UseListOrder.h
>
> Modified: llvm/trunk/include/llvm/IR/UseListOrder.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/UseListOrder.h?rev=214178&r1=214177&r2=214178&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/UseListOrder.h (original)
> +++ llvm/trunk/include/llvm/IR/UseListOrder.h Tue Jul 29 07:20:50 2014
> @@ -48,6 +48,13 @@ public:
>      std::memcpy(this, &X, sizeof(UseListShuffleVector));
>      X.Size = 0;
>    }
> +  UseListShuffleVector(const UseListShuffleVector &X) {
> +    std::memcpy(this, &X, sizeof(UseListShuffleVector));
> +    if (!isSmall()) {
> +      Storage.Ptr = new unsigned[Size];
> +      std::memcpy(Storage.Ptr, X.Storage.Ptr, Size * sizeof(*Storage.Ptr));
> +    }
> +  }
>    explicit UseListShuffleVector(size_t Size) : Size(Size) {
>      if (!isSmall())
>        Storage.Ptr = new unsigned[Size];
>
>
> _______________________________________________
> 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