Skip to content

Commit

Permalink
[flang][cuda][NFC] Use mlir::emitError to get location (#116267)
Browse files Browse the repository at this point in the history
Use `mlir::emitError` so we can get location information on error.
  • Loading branch information
clementval authored Nov 14, 2024
1 parent 6f5a145 commit 02018cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static int computeWidth(mlir::Location loc, mlir::Type type,
mlir::cast<mlir::FloatType>(t.getElementType()).getWidth() / 8;
width = 2 * elemSize;
} else {
llvm::report_fatal_error("unsupported type");
mlir::emitError(loc, "unsupported type");
}
return width;
}
Expand Down

0 comments on commit 02018cf

Please sign in to comment.