@@ -200,7 +200,7 @@ mlir::LogicalResult CIRGenFunction::emitOpenACCOp(
200
200
201
201
mlir::LogicalResult
202
202
CIRGenFunction::emitOpenACCComputeConstruct (const OpenACCComputeConstruct &s) {
203
- mlir::Location start = getLoc (s.getSourceRange ().getEnd ());
203
+ mlir::Location start = getLoc (s.getSourceRange ().getBegin ());
204
204
mlir::Location end = getLoc (s.getSourceRange ().getEnd ());
205
205
206
206
switch (s.getDirectiveKind ()) {
@@ -223,7 +223,7 @@ CIRGenFunction::emitOpenACCComputeConstruct(const OpenACCComputeConstruct &s) {
223
223
224
224
mlir::LogicalResult
225
225
CIRGenFunction::emitOpenACCDataConstruct (const OpenACCDataConstruct &s) {
226
- mlir::Location start = getLoc (s.getSourceRange ().getEnd ());
226
+ mlir::Location start = getLoc (s.getSourceRange ().getBegin ());
227
227
mlir::Location end = getLoc (s.getSourceRange ().getEnd ());
228
228
229
229
return emitOpenACCOpAssociatedStmt<DataOp, mlir::acc::TerminatorOp>(
@@ -233,21 +233,21 @@ CIRGenFunction::emitOpenACCDataConstruct(const OpenACCDataConstruct &s) {
233
233
234
234
mlir::LogicalResult
235
235
CIRGenFunction::emitOpenACCInitConstruct (const OpenACCInitConstruct &s) {
236
- mlir::Location start = getLoc (s.getSourceRange ().getEnd ());
236
+ mlir::Location start = getLoc (s.getSourceRange ().getBegin ());
237
237
return emitOpenACCOp<InitOp>(start, s.getDirectiveKind (), s.getDirectiveLoc (),
238
238
s.clauses ());
239
239
}
240
240
241
241
mlir::LogicalResult
242
242
CIRGenFunction::emitOpenACCSetConstruct (const OpenACCSetConstruct &s) {
243
- mlir::Location start = getLoc (s.getSourceRange ().getEnd ());
243
+ mlir::Location start = getLoc (s.getSourceRange ().getBegin ());
244
244
return emitOpenACCOp<SetOp>(start, s.getDirectiveKind (), s.getDirectiveLoc (),
245
245
s.clauses ());
246
246
}
247
247
248
248
mlir::LogicalResult CIRGenFunction::emitOpenACCShutdownConstruct (
249
249
const OpenACCShutdownConstruct &s) {
250
- mlir::Location start = getLoc (s.getSourceRange ().getEnd ());
250
+ mlir::Location start = getLoc (s.getSourceRange ().getBegin ());
251
251
return emitOpenACCOp<ShutdownOp>(start, s.getDirectiveKind (),
252
252
s.getDirectiveLoc (), s.clauses ());
253
253
}
0 commit comments