[Mlir-commits] [mlir] ebdf00b - [mlir] Allow accessing TypeID of attrs/types defs

Jeff Niu llvmlistbot at llvm.org
Mon Sep 26 10:09:05 PDT 2022


Author: Mathieu Fehr
Date: 2022-09-26T10:08:54-07:00
New Revision: ebdf00bc1982d38a1f175c41c138254454b802cc

URL: https://github.com/llvm/llvm-project/commit/ebdf00bc1982d38a1f175c41c138254454b802cc
DIFF: https://github.com/llvm/llvm-project/commit/ebdf00bc1982d38a1f175c41c138254454b802cc.diff

LOG: [mlir] Allow accessing TypeID of attrs/types defs

SelfOwningTypeID was inherited privately, so it was not possible to access
the TypeID of an attribute or a type definition.

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D134593

Added: 
    

Modified: 
    mlir/include/mlir/IR/ExtensibleDialect.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/ExtensibleDialect.h b/mlir/include/mlir/IR/ExtensibleDialect.h
index 520712f0bbc60..662a7353bfd0e 100644
--- a/mlir/include/mlir/IR/ExtensibleDialect.h
+++ b/mlir/include/mlir/IR/ExtensibleDialect.h
@@ -51,7 +51,7 @@ struct DynamicTypeStorage;
 /// extensible dialect (a dialect inheriting ExtensibleDialect). This class
 /// stores the parser, the printer, and the verifier of the attribute. Each
 /// dynamic attribute definition refers to one instance of this class.
-class DynamicAttrDefinition : SelfOwningTypeID {
+class DynamicAttrDefinition : public SelfOwningTypeID {
 public:
   using VerifierFn = llvm::unique_function<LogicalResult(
       function_ref<InFlightDiagnostic()>, ArrayRef<Attribute>) const>;
@@ -196,7 +196,7 @@ class DynamicAttr : public Attribute::AttrBase<DynamicAttr, Attribute,
 /// extensible dialect (a dialect inheriting ExtensibleDialect). This class
 /// stores the parser, the printer, and the verifier of the type. Each dynamic
 /// type definition refers to one instance of this class.
-class DynamicTypeDefinition : SelfOwningTypeID {
+class DynamicTypeDefinition : public SelfOwningTypeID {
 public:
   using VerifierFn = llvm::unique_function<LogicalResult(
       function_ref<InFlightDiagnostic()>, ArrayRef<Attribute>) const>;


        


More information about the Mlir-commits mailing list