[llvm] r298294 - Explicitly add move constructor/assignment operators.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 12:56:52 PDT 2017


Author: zturner
Date: Mon Mar 20 14:56:52 2017
New Revision: 298294

URL: http://llvm.org/viewvc/llvm-project?rev=298294&view=rev
Log:
Explicitly add move constructor/assignment operators.

These are needed due to some obscure rules in the standard
about how std::vector selects between copy and move
constructors, which can cause a conforming implementation
to attempt to select the copy constructor of RuleMatcher,
which will fail since std::unique_ptr<> isn't copyable.

Modified:
    llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp

Modified: llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp?rev=298294&r1=298293&r2=298294&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp Mon Mar 20 14:56:52 2017
@@ -174,6 +174,8 @@ class RuleMatcher {
 public:
   RuleMatcher()
       : Matchers(), Actions(), InsnVariableNames(), NextInsnVarID(0) {}
+  RuleMatcher(RuleMatcher &&Other) = default;
+  RuleMatcher &operator=(RuleMatcher &&Other) = default;
 
   InstructionMatcher &addInstructionMatcher();
 




More information about the llvm-commits mailing list