Skip to content

Commit 40766ab

Browse files
committed
Correct device-type for loops
1 parent e12a501 commit 40766ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class OpenACCClauseCIREmitter final
134134

135135
// Ensure we keep the existing ones, and in the correct 'new' order.
136136
if (existingDeviceTypes) {
137-
for (const mlir::Attribute &Attr : *existingDeviceTypes)
137+
for (mlir::Attribute Attr : *existingDeviceTypes)
138138
deviceTypes.push_back(mlir::acc::DeviceTypeAttr::get(
139139
builder.getContext(),
140140
cast<mlir::acc::DeviceTypeAttr>(Attr).getValue()));
@@ -172,7 +172,7 @@ class OpenACCClauseCIREmitter final
172172
operation.getNumWorkersDeviceTypeAttr();
173173

174174
if (existingDeviceTypes) {
175-
for (const mlir::Attribute &Attr : existingDeviceTypes)
175+
for (mlir::Attribute Attr : existingDeviceTypes)
176176
deviceTypes.push_back(mlir::acc::DeviceTypeAttr::get(
177177
builder.getContext(),
178178
cast<mlir::acc::DeviceTypeAttr>(Attr).getValue()));

0 commit comments

Comments
 (0)