[Mlir-commits] [mlir] 1db1a08 - [mlir] Avoid pontentially ambiguous class name
Jean-Michel Gorius
llvmlistbot at llvm.org
Tue Jun 23 12:24:55 PDT 2020
Author: Jean-Michel Gorius
Date: 2020-06-23T21:24:43+02:00
New Revision: 1db1a08ddae6174e0e0bf6f8a8404cef9091b68b
URL: https://github.com/llvm/llvm-project/commit/1db1a08ddae6174e0e0bf6f8a8404cef9091b68b
DIFF: https://github.com/llvm/llvm-project/commit/1db1a08ddae6174e0e0bf6f8a8404cef9091b68b.diff
LOG: [mlir] Avoid pontentially ambiguous class name
Summary: The Pass class exists in both the mlir and the llvm namespaces. Use the fully qualified class name to avoid any ambiguities.
Reviewers: rriddle
Reviewed By: rriddle
Subscribers: mehdi_amini, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, jurahul, msifontes
Tags: #mlir
Differential Revision: https://reviews.llvm.org/D82371
Added:
Modified:
mlir/tools/mlir-tblgen/PassGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/PassGen.cpp b/mlir/tools/mlir-tblgen/PassGen.cpp
index 2ca8671a2f78..b662b434950e 100644
--- a/mlir/tools/mlir-tblgen/PassGen.cpp
+++ b/mlir/tools/mlir-tblgen/PassGen.cpp
@@ -53,7 +53,7 @@ class {0}Base : public {1} {
}
/// A clone method to create a copy of this pass.
- std::unique_ptr<Pass> clonePass() const override {{
+ std::unique_ptr<::mlir::Pass> clonePass() const override {{
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
@@ -122,7 +122,7 @@ static void emitRegistration(ArrayRef<Pass> passes, raw_ostream &os) {
os << llvm::formatv("#ifdef GEN_PASS_REGISTRATION_{0}\n",
pass.getDef()->getName());
os << llvm::formatv("::mlir::registerPass(\"{0}\", \"{1}\", []() -> "
- "std::unique_ptr<Pass> {{ return {2}; });\n",
+ "std::unique_ptr<::mlir::Pass> {{ return {2}; });\n",
pass.getArgument(), pass.getSummary(),
pass.getConstructor());
os << llvm::formatv("#endif // GEN_PASS_REGISTRATION_{0}\n",
More information about the Mlir-commits
mailing list