[mlir][Diagnostic] Don't store Operation arguments as a DiagnosticArgument
authorRiver Riddle <riddleriver@gmail.com>
Tue, 7 Apr 2020 19:44:22 +0000 (12:44 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Tue, 7 Apr 2020 19:49:06 +0000 (12:49 -0700)
commitc0a33aaa804847e74e1514ce881d43435e94c172
tree7e9cf4b06247e1cacfdf3af78ad851f3e3d31c5b
parente0ae907ab5a15fe6d814f4794ab6f4c541149482
[mlir][Diagnostic] Don't store Operation arguments as a DiagnosticArgument

Summary: Diagnostics may be cached in the parallel diagnostic handler to preserve proper ordering. Storing the Operation as a DiagnosticArgument is problematic as the operation may be erased or changed before it finally gets printed.

Differential Revision: https://reviews.llvm.org/D77675
mlir/include/mlir/IR/Diagnostics.h
mlir/lib/IR/Diagnostics.cpp