Explicitly add move constructor/assignment operators.
authorZachary Turner <zturner@google.com>
Mon, 20 Mar 2017 19:56:52 +0000 (19:56 +0000)
committerZachary Turner <zturner@google.com>
Mon, 20 Mar 2017 19:56:52 +0000 (19:56 +0000)
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.

llvm-svn: 298294

llvm/utils/TableGen/GlobalISelEmitter.cpp

index ae386ae..596cd3c 100644 (file)
@@ -174,6 +174,8 @@ class RuleMatcher {
 public:
   RuleMatcher()
       : Matchers(), Actions(), InsnVariableNames(), NextInsnVarID(0) {}
+  RuleMatcher(RuleMatcher &&Other) = default;
+  RuleMatcher &operator=(RuleMatcher &&Other) = default;
 
   InstructionMatcher &addInstructionMatcher();