-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[OpenACC][CIR] Fix transform inclusive scan init parameter #161428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This fixes macos build, where otherwise the compilation yields an error: `no viable conversion from 'bool' to 'typename iterator_traits<const QualType *>::value_type`
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) ChangesThis fixes macos build, where otherwise the compilation yields an error: Full diff: https://github.com/llvm/llvm-project/pull/161428.diff 1 Files Affected:
diff --git a/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp b/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp
index e41c2d85fbd5d..fc28ac552224c 100644
--- a/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp
@@ -89,7 +89,7 @@ mlir::Value OpenACCRecipeBuilderBase::makeBoundsAlloca(
std::transform_inclusive_scan(
resultTypes.begin(), resultTypes.end(),
std::back_inserter(allocasLeftArr), std::plus<bool>{},
- [](QualType ty) { return !ty->isConstantArrayType(); });
+ [](QualType ty) { return !ty->isConstantArrayType(); }, false);
// Keep track of the number of 'elements' that we're allocating. Individual
// allocas should multiply this by the size of its current allocation.
|
resultTypes.begin(), resultTypes.end(), | ||
std::back_inserter(allocasLeftArr), std::plus<bool>{}, | ||
[](QualType ty) { return !ty->isConstantArrayType(); }); | ||
[](QualType ty) { return !ty->isConstantArrayType(); }, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, looks like someone's library is missing overload 1 here :)
https://en.cppreference.com/w/cpp/algorithm/transform_inclusive_scan.html
This fixes macos build, where otherwise the compilation yields an error: `no viable conversion from 'bool' to 'typename iterator_traits<const QualType *>::value_type`
This fixes macos build, where otherwise the compilation yields an error:
no viable conversion from 'bool' to 'typename iterator_traits<const QualType *>::value_type