diff options
| author | Tobias Grosser <tobias@grosser.es> | 2017-04-23 07:54:12 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2017-04-23 07:54:12 +0000 |
| commit | 9b34a08b19cf67abfa68ca1e7b68bd1c5edb334b (patch) | |
| tree | d09926223db5bc629a51618affe566c9771fee82 | |
| parent | 544988f34d3f65e4dbaf29d53a1eb107ce272baf (diff) | |
| download | bcm5719-llvm-9b34a08b19cf67abfa68ca1e7b68bd1c5edb334b.tar.gz bcm5719-llvm-9b34a08b19cf67abfa68ca1e7b68bd1c5edb334b.zip | |
[isl C++ bindings] Add explicit const casts for *foreach* bindings
This avoids a compiler warning about lost 'const' attributes.
Suggested-by: Michael Kruse <llvm@meinersbur.de>
llvm-svn: 301108
| -rw-r--r-- | polly/lib/External/isl/include/isl-noexceptions.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/polly/lib/External/isl/include/isl-noexceptions.h b/polly/lib/External/isl/include/isl-noexceptions.h index 234c6ec1b7b..a6d894e28a4 100644 --- a/polly/lib/External/isl/include/isl-noexceptions.h +++ b/polly/lib/External/isl/include/isl-noexceptions.h @@ -2467,7 +2467,7 @@ isl::stat map::foreach_basic_map(const std::function<isl::stat(isl::basic_map)> stat ret = (*func) (isl::manage(arg_0)); return isl_stat(ret); }; - auto res = isl_map_foreach_basic_map(get(), fn_lambda, (void *) &fn); + auto res = isl_map_foreach_basic_map(get(), fn_lambda, const_cast<void*>((const void *) &fn)); return isl::stat(res); } @@ -3282,7 +3282,7 @@ isl::stat pw_aff::foreach_piece(const std::function<isl::stat(isl::set, isl::aff stat ret = (*func) (isl::manage(arg_0), isl::manage(arg_1)); return isl_stat(ret); }; - auto res = isl_pw_aff_foreach_piece(get(), fn_lambda, (void *) &fn); + auto res = isl_pw_aff_foreach_piece(get(), fn_lambda, const_cast<void*>((const void *) &fn)); return isl::stat(res); } @@ -3957,7 +3957,7 @@ isl::stat set::foreach_basic_set(const std::function<isl::stat(isl::basic_set)> stat ret = (*func) (isl::manage(arg_0)); return isl_stat(ret); }; - auto res = isl_set_foreach_basic_set(get(), fn_lambda, (void *) &fn); + auto res = isl_set_foreach_basic_set(get(), fn_lambda, const_cast<void*>((const void *) &fn)); return isl::stat(res); } @@ -4607,7 +4607,7 @@ isl::stat union_map::foreach_map(const std::function<isl::stat(isl::map)> &fn) c stat ret = (*func) (isl::manage(arg_0)); return isl_stat(ret); }; - auto res = isl_union_map_foreach_map(get(), fn_lambda, (void *) &fn); + auto res = isl_union_map_foreach_map(get(), fn_lambda, const_cast<void*>((const void *) &fn)); return isl::stat(res); } @@ -4897,7 +4897,7 @@ isl::stat union_pw_aff::foreach_pw_aff(const std::function<isl::stat(isl::pw_aff stat ret = (*func) (isl::manage(arg_0)); return isl_stat(ret); }; - auto res = isl_union_pw_aff_foreach_pw_aff(get(), fn_lambda, (void *) &fn); + auto res = isl_union_pw_aff_foreach_pw_aff(get(), fn_lambda, const_cast<void*>((const void *) &fn)); return isl::stat(res); } @@ -5177,7 +5177,7 @@ isl::stat union_set::foreach_point(const std::function<isl::stat(isl::point)> &f stat ret = (*func) (isl::manage(arg_0)); return isl_stat(ret); }; - auto res = isl_union_set_foreach_point(get(), fn_lambda, (void *) &fn); + auto res = isl_union_set_foreach_point(get(), fn_lambda, const_cast<void*>((const void *) &fn)); return isl::stat(res); } @@ -5187,7 +5187,7 @@ isl::stat union_set::foreach_set(const std::function<isl::stat(isl::set)> &fn) c stat ret = (*func) (isl::manage(arg_0)); return isl_stat(ret); }; - auto res = isl_union_set_foreach_set(get(), fn_lambda, (void *) &fn); + auto res = isl_union_set_foreach_set(get(), fn_lambda, const_cast<void*>((const void *) &fn)); return isl::stat(res); } |

