#define MLIR_ANALYSIS_MLFUNCTIONMATCHER_H_
#include "mlir/IR/Function.h"
+#include "mlir/IR/Operation.h"
#include "llvm/Support/Allocator.h"
namespace mlir {
#ifndef MLIR_IR_FUNCTION_H
#define MLIR_IR_FUNCTION_H
-#include "mlir/IR/Operation.h"
+#include "mlir/IR/Attributes.h"
+#include "mlir/IR/Block.h"
+#include "mlir/IR/Identifier.h"
+#include "mlir/IR/Location.h"
namespace mlir {
class BlockAndValueMapping;
/// Emit an error about fatal conditions with this function, reporting up to
/// any diagnostic handlers that may be listening.
- InFlightDiagnostic emitError(const Twine &message = {});
+ InFlightDiagnostic emitError();
+ InFlightDiagnostic emitError(const Twine &message);
/// Emit a warning about this function, reporting up to any diagnostic
/// handlers that may be listening.
- InFlightDiagnostic emitWarning(const Twine &message = {});
+ InFlightDiagnostic emitWarning();
+ InFlightDiagnostic emitWarning(const Twine &message);
/// Emit a remark about this function, reporting up to any diagnostic
/// handlers that may be listening.
- InFlightDiagnostic emitRemark(const Twine &message = {});
+ InFlightDiagnostic emitRemark();
+ InFlightDiagnostic emitRemark(const Twine &message);
/// Displays the CFG in a window. This is for use from the debugger and
/// depends on Graphviz to generate the graph.
};
} // end namespace llvm
-#endif // MLIR_IR_FUNCTION_H
+#endif // MLIR_IR_FUNCTION_H
#include "mlir/IR/Attributes.h"
#include "AttributeDetail.h"
#include "mlir/IR/AffineMap.h"
+#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Function.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/IR/Types.h"
+#include "llvm/ADT/Twine.h"
using namespace mlir;
using namespace mlir::detail;
// =============================================================================
#include "mlir/IR/Function.h"
-#include "mlir/IR/Attributes.h"
#include "mlir/IR/BlockAndValueMapping.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Module.h"
-#include "mlir/IR/Types.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
+
using namespace mlir;
Function::Function(Location location, StringRef name, FunctionType type,
/// any diagnostic handlers that may be listening. This function always
/// returns failure. NOTE: This may terminate the containing application, only
/// use when the IR is in an inconsistent state.
+InFlightDiagnostic Function::emitError() { return emitError({}); }
InFlightDiagnostic Function::emitError(const Twine &message) {
return getContext()->emitError(getLoc(), message);
}
/// Emit a warning about this function, reporting up to any diagnostic
/// handlers that may be listening.
+InFlightDiagnostic Function::emitWarning() { return emitWarning({}); }
InFlightDiagnostic Function::emitWarning(const Twine &message) {
return getContext()->emitWarning(getLoc(), message);
}
/// Emit a remark about this function, reporting up to any diagnostic
/// handlers that may be listening.
+InFlightDiagnostic Function::emitRemark() { return emitRemark({}); }
InFlightDiagnostic Function::emitRemark(const Twine &message) {
return getContext()->emitRemark(getLoc(), message);
}
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/Twine.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/RWMutex.h"
#include "llvm/Support/raw_ostream.h"