[clang] Fix compilation warnings in OpenMP declare mapper codegen.

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
This commit is contained in:
George Rokos 2020-07-16 11:02:55 -07:00
parent ef658ebd62
commit fc47c0e0a6
1 changed files with 3 additions and 3 deletions

View File

@ -8008,12 +8008,12 @@ public:
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));
}
@ -8029,7 +8029,7 @@ public:
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() &&