Skip to content

Commit b890b7b

Browse files
committed
Nits from Andy
1 parent 3a7a457 commit b890b7b

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ class OpenACCClauseCIREmitter final
4242
// This is necessary since a few of the clauses emit differently based on the
4343
// directive kind they are attached to.
4444
OpenACCDirectiveKind dirKind;
45-
// This source location should be able to go away once the NYI diagnostics are
46-
// gone.
45+
// TODO(cir): This source location should be able to go away once the NYI
46+
// diagnostics are gone.
4747
SourceLocation dirLoc;
4848

4949
void clauseNotImplemented(const OpenACCClause &c) {
50-
cgf.getCIRGenModule().errorNYI(c.getSourceRange(), "OpenACC Clause",
51-
c.getClauseKind());
50+
cgf.cgm.errorNYI(c.getSourceRange(), "OpenACC Clause", c.getClauseKind());
5251
}
5352

5453
public:
@@ -136,8 +135,8 @@ class OpenACCClauseCIREmitter final
136135
mlir::Value condition =
137136
cgf.evaluateExprAsBool(clause.getConditionExpr());
138137

139-
mlir::Location exprLoc = cgf.getCIRGenModule().getLoc(
140-
clause.getConditionExpr()->getBeginLoc());
138+
mlir::Location exprLoc =
139+
cgf.cgm.getLoc(clause.getConditionExpr()->getBeginLoc());
141140
mlir::IntegerType targetType = mlir::IntegerType::get(
142141
&cgf.getMLIRContext(), /*width=*/1,
143142
mlir::IntegerType::SignednessSemantics::Signless);
@@ -271,46 +270,46 @@ mlir::LogicalResult CIRGenFunction::emitOpenACCShutdownConstruct(
271270

272271
mlir::LogicalResult
273272
CIRGenFunction::emitOpenACCLoopConstruct(const OpenACCLoopConstruct &s) {
274-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC Loop Construct");
273+
cgm.errorNYI(s.getSourceRange(), "OpenACC Loop Construct");
275274
return mlir::failure();
276275
}
277276
mlir::LogicalResult CIRGenFunction::emitOpenACCCombinedConstruct(
278277
const OpenACCCombinedConstruct &s) {
279-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC Combined Construct");
278+
cgm.errorNYI(s.getSourceRange(), "OpenACC Combined Construct");
280279
return mlir::failure();
281280
}
282281
mlir::LogicalResult CIRGenFunction::emitOpenACCEnterDataConstruct(
283282
const OpenACCEnterDataConstruct &s) {
284-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC EnterData Construct");
283+
cgm.errorNYI(s.getSourceRange(), "OpenACC EnterData Construct");
285284
return mlir::failure();
286285
}
287286
mlir::LogicalResult CIRGenFunction::emitOpenACCExitDataConstruct(
288287
const OpenACCExitDataConstruct &s) {
289-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC ExitData Construct");
288+
cgm.errorNYI(s.getSourceRange(), "OpenACC ExitData Construct");
290289
return mlir::failure();
291290
}
292291
mlir::LogicalResult CIRGenFunction::emitOpenACCHostDataConstruct(
293292
const OpenACCHostDataConstruct &s) {
294-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC HostData Construct");
293+
cgm.errorNYI(s.getSourceRange(), "OpenACC HostData Construct");
295294
return mlir::failure();
296295
}
297296
mlir::LogicalResult
298297
CIRGenFunction::emitOpenACCWaitConstruct(const OpenACCWaitConstruct &s) {
299-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC Wait Construct");
298+
cgm.errorNYI(s.getSourceRange(), "OpenACC Wait Construct");
300299
return mlir::failure();
301300
}
302301
mlir::LogicalResult
303302
CIRGenFunction::emitOpenACCUpdateConstruct(const OpenACCUpdateConstruct &s) {
304-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC Update Construct");
303+
cgm.errorNYI(s.getSourceRange(), "OpenACC Update Construct");
305304
return mlir::failure();
306305
}
307306
mlir::LogicalResult
308307
CIRGenFunction::emitOpenACCAtomicConstruct(const OpenACCAtomicConstruct &s) {
309-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC Atomic Construct");
308+
cgm.errorNYI(s.getSourceRange(), "OpenACC Atomic Construct");
310309
return mlir::failure();
311310
}
312311
mlir::LogicalResult
313312
CIRGenFunction::emitOpenACCCacheConstruct(const OpenACCCacheConstruct &s) {
314-
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenACC Cache Construct");
313+
cgm.errorNYI(s.getSourceRange(), "OpenACC Cache Construct");
315314
return mlir::failure();
316315
}

0 commit comments

Comments
 (0)