Skip to content

Commit c60f112

Browse files
committed
functional changes
1 parent f3a2990 commit c60f112

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mlir/include/mlir/Bindings/Python/Diagnostics.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define MLIR_BINDINGS_PYTHON_DIAGNOSTICS_H
1111

1212
#include <cassert>
13+
#include <cstdint>
1314
#include <string>
1415

1516
#include "mlir-c/Diagnostics.h"
@@ -45,6 +46,11 @@ class CollectDiagnosticsToStringScope {
4546
mlirLocationPrint(loc, printer, data);
4647
*static_cast<std::string *>(data) += ": ";
4748
mlirDiagnosticPrint(diag, printer, data);
49+
for (intptr_t i = 0; i < mlirDiagnosticGetNumNotes(diag); i++) {
50+
*static_cast<std::string *>(data) += "\n";
51+
MlirDiagnostic note = mlirDiagnosticGetNote(diag, i);
52+
handler(note, data);
53+
}
4854
return mlirLogicalResultSuccess();
4955
}
5056

0 commit comments

Comments
 (0)