17 RuntimeVerifiableOpInterface::generateErrorMessage(Operation *op,
18 const std::string &msg) {
20 llvm::raw_string_ostream stream(buffer);
21 OpPrintingFlags flags;
24 flags.elideLargeElementsAttrs();
25 flags.printGenericOpForm();
27 flags.useLocalScope();
28 stream <<
"ERROR: Runtime op verification failed\n";
29 op->
print(stream, flags);
30 stream <<
"\n^ " << msg;
31 stream <<
"\nLocation: ";
38 #include "mlir/Interfaces/RuntimeVerifiableOpInterface.cpp.inc"
void print(raw_ostream &os) const
Print the location.
void print(raw_ostream &os, const OpPrintingFlags &flags=std::nullopt)
Location getLoc()
The source location the operation was defined or derived from.
Include the generated interface declarations.