[Beignet] [PATCH 2/3] change Immediate::operator= from private to public

Guo Yejun yejun.guo at intel.com
Sun Dec 28 05:22:20 PST 2014


change the attribute of "Immediate & operator= (const Immediate &)"
in class Immediate from private to public, otherwise, a compile
issue appears when build with old gcc versions for the following
code in function.hpp:

    INLINE ImmediateIndex newImmediate(const Immediate &imm) {
      const ImmediateIndex index(this->immediateNum());
      this->immediates.push_back(imm);
      return index;
    }

Signed-off-by: Guo Yejun <yejun.guo at intel.com>
---
 backend/src/ir/immediate.hpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/src/ir/immediate.hpp b/backend/src/ir/immediate.hpp
index 7b6ba34..756806b 100644
--- a/backend/src/ir/immediate.hpp
+++ b/backend/src/ir/immediate.hpp
@@ -84,6 +84,8 @@ namespace ir {
   public:
     INLINE Immediate(void) { }
 
+    Immediate & operator= (const Immediate &);
+
     INLINE Type getType(void) const {
       return (Type)type;
     }
@@ -307,7 +309,6 @@ namespace ir {
       const Immediate *immVec[];
       void *p;
     } data;     //!< Value to store
-    Immediate & operator= (const Immediate &);
     Immediate operator+ (const Immediate &) const;
     Immediate operator- (const Immediate &) const;
     Immediate operator* (const Immediate &) const;
-- 
1.9.1



More information about the Beignet mailing list