/// Emit an error message using the diagnostic engine.
InFlightDiagnostic emitError(Location location, const Twine &message);
+ /// Emit a warning message using the diagnostic engine.
+ InFlightDiagnostic emitWarning(Location location, const Twine &message);
+
/// Emit a remark message using the diagnostic engine.
InFlightDiagnostic emitRemark(Location location, const Twine &message);
// Pre-conditions.
if (!elementType.isSigned()) {
// TODO: Support unsigned storage type.
- rewriter.getContext()->getDiagEngine().emit(loc,
- DiagnosticSeverity::Warning)
- << "unimplemented: dequantize signed uniform";
+ rewriter.getContext()->emitWarning(
+ loc, "unimplemented: dequantize signed uniform");
return nullptr;
}
/// Emit a warning about this function, reporting up to any diagnostic
/// handlers that may be listening.
InFlightDiagnostic Function::emitWarning(const Twine &message) {
- return getContext()->getDiagEngine().emit(getLoc(),
- DiagnosticSeverity::Warning)
- << message;
+ return getContext()->emitWarning(getLoc(), message);
}
/// Emit an error about fatal conditions with this function, reporting up to
<< message;
}
+/// Emit a warning message using the diagnostic engine.
+InFlightDiagnostic MLIRContext::emitWarning(Location location,
+ const Twine &message) {
+ return getImpl().diagEngine.emit(location, DiagnosticSeverity::Warning)
+ << message;
+}
+
/// Emit a remark message using the diagnostic engine.
InFlightDiagnostic MLIRContext::emitRemark(Location location,
const Twine &message) {
/// Emit a warning about this operation, reporting up to any diagnostic
/// handlers that may be listening.
InFlightDiagnostic Operation::emitWarning(const Twine &message) {
- return getContext()->getDiagEngine().emit(getLoc(),
- DiagnosticSeverity::Warning)
- << message;
+ return getContext()->emitWarning(getLoc(), message);
}
/// Emit an error about fatal conditions with this operation, reporting up to