Skip to content

Commit

Permalink
[clang] Fix compilation warnings in OpenMP declare mapper codegen.
Browse files Browse the repository at this point in the history
This patch fixes the compilation warnings that L is not a reference.
Thanks to Lingda Li for providing the patch.

Differential Revision: https://reviews.llvm.org/D83959
  • Loading branch information
grokos committed Jul 16, 2020
1 parent ef658eb commit fc47c0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clang/lib/CodeGen/CGOpenMPRuntime.cpp
Expand Up @@ -8008,12 +8008,12 @@ class MappableExprsHandler {
C->isImplicit(), std::get<2>(L));
}
for (const auto *C : CurExecDir->getClausesOfKind<OMPToClause>())
for (const auto &L : C->component_lists()) {
for (const auto L : C->component_lists()) {
InfoGen(std::get<0>(L), std::get<1>(L), OMPC_MAP_to, llvm::None,
/*ReturnDevicePointer=*/false, C->isImplicit(), std::get<2>(L));
}
for (const auto *C : CurExecDir->getClausesOfKind<OMPFromClause>())
for (const auto &L : C->component_lists()) {
for (const auto L : C->component_lists()) {
InfoGen(std::get<0>(L), std::get<1>(L), OMPC_MAP_from, llvm::None,
/*ReturnDevicePointer=*/false, C->isImplicit(), std::get<2>(L));
}
Expand All @@ -8029,7 +8029,7 @@ class MappableExprsHandler {

for (const auto *C :
CurExecDir->getClausesOfKind<OMPUseDevicePtrClause>()) {
for (const auto &L : C->component_lists()) {
for (const auto L : C->component_lists()) {
OMPClauseMappableExprCommon::MappableExprComponentListRef Components =
std::get<1>(L);
assert(!Components.empty() &&
Expand Down

0 comments on commit fc47c0e

Please sign in to comment.