mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-14 17:56:39 +00:00
[OpenACC] Fix source-location on a handful of CIR Directives
Apparently we used the 'end location' instead of 'start' in a few places.
This commit is contained in:
parent
6f5e993b17
commit
52ef55864f
@ -200,7 +200,7 @@ mlir::LogicalResult CIRGenFunction::emitOpenACCOp(
|
||||
|
||||
mlir::LogicalResult
|
||||
CIRGenFunction::emitOpenACCComputeConstruct(const OpenACCComputeConstruct &s) {
|
||||
mlir::Location start = getLoc(s.getSourceRange().getEnd());
|
||||
mlir::Location start = getLoc(s.getSourceRange().getBegin());
|
||||
mlir::Location end = getLoc(s.getSourceRange().getEnd());
|
||||
|
||||
switch (s.getDirectiveKind()) {
|
||||
@ -223,7 +223,7 @@ CIRGenFunction::emitOpenACCComputeConstruct(const OpenACCComputeConstruct &s) {
|
||||
|
||||
mlir::LogicalResult
|
||||
CIRGenFunction::emitOpenACCDataConstruct(const OpenACCDataConstruct &s) {
|
||||
mlir::Location start = getLoc(s.getSourceRange().getEnd());
|
||||
mlir::Location start = getLoc(s.getSourceRange().getBegin());
|
||||
mlir::Location end = getLoc(s.getSourceRange().getEnd());
|
||||
|
||||
return emitOpenACCOpAssociatedStmt<DataOp, mlir::acc::TerminatorOp>(
|
||||
@ -233,21 +233,21 @@ CIRGenFunction::emitOpenACCDataConstruct(const OpenACCDataConstruct &s) {
|
||||
|
||||
mlir::LogicalResult
|
||||
CIRGenFunction::emitOpenACCInitConstruct(const OpenACCInitConstruct &s) {
|
||||
mlir::Location start = getLoc(s.getSourceRange().getEnd());
|
||||
mlir::Location start = getLoc(s.getSourceRange().getBegin());
|
||||
return emitOpenACCOp<InitOp>(start, s.getDirectiveKind(), s.getDirectiveLoc(),
|
||||
s.clauses());
|
||||
}
|
||||
|
||||
mlir::LogicalResult
|
||||
CIRGenFunction::emitOpenACCSetConstruct(const OpenACCSetConstruct &s) {
|
||||
mlir::Location start = getLoc(s.getSourceRange().getEnd());
|
||||
mlir::Location start = getLoc(s.getSourceRange().getBegin());
|
||||
return emitOpenACCOp<SetOp>(start, s.getDirectiveKind(), s.getDirectiveLoc(),
|
||||
s.clauses());
|
||||
}
|
||||
|
||||
mlir::LogicalResult CIRGenFunction::emitOpenACCShutdownConstruct(
|
||||
const OpenACCShutdownConstruct &s) {
|
||||
mlir::Location start = getLoc(s.getSourceRange().getEnd());
|
||||
mlir::Location start = getLoc(s.getSourceRange().getBegin());
|
||||
return emitOpenACCOp<ShutdownOp>(start, s.getDirectiveKind(),
|
||||
s.getDirectiveLoc(), s.clauses());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user