[PATCH] D34411: [TableGen] Remove some copies around PatternToMatch.

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 04:06:40 PDT 2017


aymanmus added a comment.

This mainly solves the problem described in D34341 <https://reviews.llvm.org/D34341>, only thing left is to change the call of emplace_back([argumetns]) with push_back(PatternToMatch([arguments])).
I'll update my patch and mark it as dependent with this one.

In the case of the PatternToMatch class (which includes only pointers, integers and a vector), I believe the move constructor would be implicitly declared by the compiler, and as the temp object passed to push_back is an rvalue, the implicit move constructor would be called.


https://reviews.llvm.org/D34411





More information about the llvm-commits mailing list