[Mlir-commits] [mlir] d20f749 - [mlir] Drop uses of operator<<(raw_ostream &OS, const Optional<T> &O)
Fangrui Song
llvmlistbot at llvm.org
Fri Dec 16 11:57:36 PST 2022
Author: Fangrui Song
Date: 2022-12-16T19:57:30Z
New Revision: d20f749f0ae8cd7cdcffead65d482ba4c393a917
URL: https://github.com/llvm/llvm-project/commit/d20f749f0ae8cd7cdcffead65d482ba4c393a917
DIFF: https://github.com/llvm/llvm-project/commit/d20f749f0ae8cd7cdcffead65d482ba4c393a917.diff
LOG: [mlir] Drop uses of operator<<(raw_ostream &OS, const Optional<T> &O)
Added:
Modified:
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/Tools/PDLL/AST/NodePrinter.cpp
Removed:
################################################################################
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<StringRef> name = decl->getName())
- os << " Name<" << name << ">";
+ os << " Name<" << *name << ">";
os << "\n";
}
More information about the Mlir-commits
mailing list