[PATCH] D16947: [PGO] assignment operator does not get profile data
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 8 08:47:00 PST 2016
vsk added a comment.
Thanks! This is definitely the right fix, since it fixes up implicitly-generated move constructors as well. However, I think the test can be simpler (while also checking that move constructors are handled correctly). E.g:
struct A {
void operator=(const A &a) {}
void operator=(const A &&a) {}
};
struct B {
A a;
B &operator=(const B &b) = default;
B &operator=(B &&b) = default;
};
int main() {
B b1, b2;
b1 = b2;
b2 = static_cast<B &&>(b1);
return 0;
}
http://reviews.llvm.org/D16947
More information about the llvm-commits
mailing list