[mlir][python] Fix issue in diagnostic note initialization
authorrkayaith <rkayaith@gmail.com>
Sat, 16 Jul 2022 20:41:33 +0000 (16:41 -0400)
committerrkayaith <rkayaith@gmail.com>
Fri, 22 Jul 2022 20:56:14 +0000 (16:56 -0400)
commit65aedd338c1edd1ebeee709268d507df7c592e6a
treef3e762f1682f5f34764ccaf5be3b193e6cc5880e
parentc93e4b6b2c497aecda82029d6f161bd81da26dab
[mlir][python] Fix issue in diagnostic note initialization

Previously the elements of the notes tuple would be invalid objects when
accessed from a diagnostic handler, resulting in a segfault when used.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D129943
mlir/lib/Bindings/Python/IRCore.cpp
mlir/test/python/ir/diagnostic_handler.py