Skip to content

Commit 02018cf

Browse files
authored
[flang][cuda][NFC] Use mlir::emitError to get location (#116267)
Use `mlir::emitError` so we can get location information on error.
1 parent 6f5a145 commit 02018cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Optimizer/Transforms/CUFOpConversion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static int computeWidth(mlir::Location loc, mlir::Type type,
283283
mlir::cast<mlir::FloatType>(t.getElementType()).getWidth() / 8;
284284
width = 2 * elemSize;
285285
} else {
286-
llvm::report_fatal_error("unsupported type");
286+
mlir::emitError(loc, "unsupported type");
287287
}
288288
return width;
289289
}

0 commit comments

Comments
 (0)