Use default copy/move constructors/assignments for Instruction.
authorLei Zhang <antiagainst@google.com>
Thu, 28 Jul 2016 13:09:00 +0000 (09:09 -0400)
committerLei Zhang <antiagainst@gmail.com>
Fri, 29 Jul 2016 04:58:09 +0000 (00:58 -0400)
source/opt/instruction.h

index 611f08b..18447ca 100644 (file)
@@ -85,6 +85,12 @@ class Instruction {
   Instruction(const spv_parsed_instruction_t& inst,
               std::vector<Instruction>&& dbg_line = {});
 
+  Instruction(const Instruction&) = default;
+  Instruction& operator=(const Instruction&) = default;
+
+  Instruction(Instruction&&) = default;
+  Instruction& operator=(Instruction&&) = default;
+
   SpvOp opcode() const { return opcode_; }
   // Sets the opcode of this instruction to a specific opcode. Note this may
   // invalidate the instruction.