Debug print an mlir::Type

Just a quick question on how to dump/print out the mlir::Type info,
as while debugging this would be very useful to me. Basically, I want to do something like this:

auto opType = op->getOperand(0).getType();
std::cout << " Type of my operand 0 is : " << opType << std::endl;

Thanks.

You can use type.dump(), but also with streams the preferred way is to use LLVM streams: llvm::outs() << type << … (or llvm::errs()).

Thanks Mehdi !