[PATCH] D17641: [Polly] [MemAccInst] Delete all the assignment operators, as they are not need.

Hongbin Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 08:49:26 PST 2016

etherzhhb added a comment.

In http://reviews.llvm.org/D17641#362857, @Meinersbur wrote:

> I created these for the following reason:
> As a general rule for 'pass-by-value' types, for every implicit copy-constructor, there should also also an operator=() for it. Otherwise, this works:
>   StoreInst *SI = [...]
>   MemAccInst x = SI;
> but not this:
>   StoreInst *SI = [...]
>   MemAccInst x;
>   x = SI;

But we did write code like this (yet), right?

> If assigning a nullptr to a MemAccInst is confusing, then assigning nullptr to a StoreInst* (which it mimics) must be equally confusing.

Allow changing a MemAccInst from load to store also confuse me a little bit.

> The only reason I can think of to remove these is that we currently do not assign to a MemAccInst variable.



More information about the llvm-commits mailing list