[polly] r300398 - Update isl bindings to latest version (+ Polly extensions)

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 23 01:07:13 PDT 2017


Does r301108 help?

Best,
Tobias

On Sat, Apr 22, 2017, at 06:08 PM, Michael Kruse via llvm-commits wrote:
> 2017-04-15 10:15 GMT+02:00 Tobias Grosser via llvm-commits
> <llvm-commits at lists.llvm.org>:
> > -isl::stat map::foreach_basic_map(std::function<isl::stat(isl::basic_map)> &&fn) const {
> > +isl::stat map::foreach_basic_map(const std::function<isl::stat(isl::basic_map)> &fn) const {
> >    auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
> >      auto *func = (std::function<isl::stat(isl::basic_map)> *)arg_1;
> > -    isl::stat ret = (*func)(isl::manage(arg_0));
> > +    stat ret = (*func) (isl::manage(arg_0));
> >      return isl_stat(ret);
> >    };
> > -  auto res = isl_map_foreach_basic_map(get(), fn_lambda, &fn);
> > +  auto res = isl_map_foreach_basic_map(get(), fn_lambda, (void *) &fn);
> 
> This makes gcc/clang output a lot of warings such as:
> 
> In file included from
> /root/src/llvm/tools/polly/include/polly/Support/GICHelper.h:28:0,
>                  from
> /root/src/llvm/tools/polly/lib/Analysis/PolyhedralInfo.cpp:26:
> /root/src/llvm/tools/polly/lib/External/isl/include/isl-noexceptions.h:
> In member function ‘isl::noexceptions::stat
> isl::noexceptions::map::foreach_basic_map(const
> std::function<isl::noexceptions::stat(isl::noexceptions::basic_map)>&)
> const’:
> /root/src/llvm/tools/polly/lib/External/isl/include/isl-noexceptions.h:2470:68:
> warning: cast from type ‘const
> std::function<isl::noexceptions::stat(isl::noexceptions::basic_map)>*’
> to type ‘void*’ casts away qualifiers [-Wcast-qual]
>    auto res = isl_map_foreach_basic_map(get(), fn_lambda, (void *) &fn);
>                                                                     ^
> 
> Could you add a const_cast to silence that warning?
> 
> >    return isl::stat(res);
> >  }
> 
> Michael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list