forked from OSchip/llvm-project
[MLIR][NFC] Value print update for block arguments
Emit some more information when printing/dumping `Value`s of `BlockArgument` kind. This is purely to help for debugging purposes. Differential Revision: https://reviews.llvm.org/D87670
This commit is contained in:
parent
757ac4ccfb
commit
9c40495a35
|
@ -2359,16 +2359,18 @@ void Value::print(raw_ostream &os) {
|
|||
if (auto *op = getDefiningOp())
|
||||
return op->print(os);
|
||||
// TODO: Improve this.
|
||||
assert(isa<BlockArgument>());
|
||||
os << "<block argument>\n";
|
||||
BlockArgument arg = this->cast<BlockArgument>();
|
||||
os << "<block argument> of type '" << arg.getType()
|
||||
<< "' at index: " << arg.getArgNumber() << '\n';
|
||||
}
|
||||
void Value::print(raw_ostream &os, AsmState &state) {
|
||||
if (auto *op = getDefiningOp())
|
||||
return op->print(os, state);
|
||||
|
||||
// TODO: Improve this.
|
||||
assert(isa<BlockArgument>());
|
||||
os << "<block argument>\n";
|
||||
BlockArgument arg = this->cast<BlockArgument>();
|
||||
os << "<block argument> of type '" << arg.getType()
|
||||
<< "' at index: " << arg.getArgNumber() << '\n';
|
||||
}
|
||||
|
||||
void Value::dump() {
|
||||
|
|
Loading…
Reference in New Issue