[flang-commits] [flang] [flang][cuda][NFC] Use mlir::emitError to get location (PR #116267)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Thu Nov 14 10:27:34 PST 2024
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/116267
Use `mlir::emitError` so we can get location information on error.
>From eb2ff4a743aacaacb3f2e3966abf9439819db926 Mon Sep 17 00:00:00 2001
From: Valentin Clement <clementval at gmail.com>
Date: Thu, 14 Nov 2024 10:26:38 -0800
Subject: [PATCH] [flang][cuda][NFC] Use mlir::emitError to get location
---
flang/lib/Optimizer/Transforms/CUFOpConversion.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flang/lib/Optimizer/Transforms/CUFOpConversion.cpp b/flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
index 58a348314573d5..0fa30cb28d84a6 100644
--- a/flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
+++ b/flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
@@ -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;
}
More information about the flang-commits
mailing list