OSDN Git Service

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298294 91177308-0d34-0410-b5e6-96231b3b80d8

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();