diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp index f6916554016eb..5483ff145136f 100644 --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -1353,7 +1353,7 @@ void SSANameState::printValueID(Value value, bool printResultNo, } if (resultNo && printResultNo) - stream << '#' << resultNo; + stream << '#' << *resultNo; } void SSANameState::printOperationID(Operation *op, raw_ostream &stream) const { diff --git a/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp b/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp index 86e9a000339e5..ea606b4f256aa 100644 --- a/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp +++ b/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp @@ -330,7 +330,7 @@ void NodePrinter::printImpl(const NamedAttributeDecl *decl) { void NodePrinter::printImpl(const OpNameDecl *decl) { os << "OpNameDecl " << decl; if (Optional name = decl->getName()) - os << " Name<" << name << ">"; + os << " Name<" << *name << ">"; os << "\n"; }