do not use the advanced C++ feature
authorLu Guanqun <guanqun.lu@intel.com>
Tue, 9 Apr 2013 06:41:08 +0000 (14:41 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 10 Apr 2013 06:52:33 +0000 (14:52 +0800)
so that it can work on gcc 4.6 happily, otherwise, I have the following issues:

    backend/src/./ir/instruction.hpp:112:7: error: type ‘gbe::ir::Instruction’ is not a direct base of ‘gbe::ir::Instruction’

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/ir/instruction.hpp

index de117e9..ec5d250 100644 (file)
@@ -109,8 +109,9 @@ namespace ir {
     }
     /*! Copy the private fields and give it the same parent */
     INLINE Instruction(const Instruction &other) :
-      Instruction(reinterpret_cast<const char*>(&other.opcode))
-    {}
+      InstructionBase(reinterpret_cast<const char*>(&other.opcode)) {
+      parent = other.parent;
+    }
   private:
     /*! To be consistant with copy constructor */
     INLINE Instruction &operator= (const Instruction &other) { return *this; }