From: MLIR Team Date: Thu, 6 Jun 2019 23:42:36 +0000 (-0700) Subject: Add the getDialectNamespace static utility method to the Linalg dialect. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8227c9ac31460d7e399c29578892541ce280abc;p=platform%2Fupstream%2Fllvm.git Add the getDialectNamespace static utility method to the Linalg dialect. PiperOrigin-RevId: 251953766 --- diff --git a/mlir/include/mlir/Linalg/IR/LinalgTypes.h b/mlir/include/mlir/Linalg/IR/LinalgTypes.h index eaf391c..30930f3 100644 --- a/mlir/include/mlir/Linalg/IR/LinalgTypes.h +++ b/mlir/include/mlir/Linalg/IR/LinalgTypes.h @@ -35,6 +35,7 @@ enum LinalgTypes { class LinalgDialect : public Dialect { public: explicit LinalgDialect(MLIRContext *context); + static StringRef getDialectNamespace() { return "linalg"; } /// Parse a type registered to this dialect. Type parseType(llvm::StringRef spec, Location loc) const override; diff --git a/mlir/lib/Linalg/IR/LinalgTypes.cpp b/mlir/lib/Linalg/IR/LinalgTypes.cpp index 453463b..4c8d87b 100644 --- a/mlir/lib/Linalg/IR/LinalgTypes.cpp +++ b/mlir/lib/Linalg/IR/LinalgTypes.cpp @@ -29,7 +29,7 @@ using namespace mlir; using namespace mlir::linalg; mlir::linalg::LinalgDialect::LinalgDialect(MLIRContext *context) - : Dialect("linalg", context) { + : Dialect(getDialectNamespace(), context) { addTypes(); addOperations();