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

Zhigang Gong zhigang.gong at linux.intel.com
Mon Jan 5 22:53:49 PST 2015


This patch LGTM, will push latter. Thanks.

On Sun, Dec 28, 2014 at 09:22:20PM +0800, Guo Yejun wrote:
> 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
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list