constify target offload data

Jakub Jelinek jakub@redhat.com
Fri Jul 17 11:27:00 GMT 2015


On Fri, Jul 17, 2015 at 02:01:12PM +0300, Ilya Verbin wrote:
> On Thu, Jul 16, 2015 at 16:08:47 -0400, Nathan Sidwell wrote:
> > Jakub, Ilya,
> > this patch against trunk constifies the offload target data.  I'm
> > having difficulty building an intelmic toolchain, so the changes
> > there aren't tested. Ilya, if you could check them, that'd be great.
> 
> Works fine with one change:
> 
> 
> diff --git a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
> index 136fb99..baa4945 100644
> --- a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
> +++ b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
> @@ -61,7 +61,7 @@ typedef std::vector<addr_pair> AddrVect;
>  typedef std::vector<AddrVect> DevAddrVect;
>  
>  /* Addresses for all images and all devices.  */
> -typedef std::map<void *, DevAddrVect> ImgDevAddrMap;
> +typedef std::map<const void *, DevAddrVect> ImgDevAddrMap;
>  
>  /* Image descriptor needed by __offload_[un]register_image.  */
>  struct TargetImageDesc {

The patch is ok for trunk with that change then.

	Jakub



More information about the Gcc-patches mailing list