[mlir] Avoid GCC naming conflict.
authorTobias Gysi <gysit@google.com>
Tue, 15 Jun 2021 14:36:54 +0000 (14:36 +0000)
committerTobias Gysi <gysit@google.com>
Tue, 15 Jun 2021 14:48:30 +0000 (14:48 +0000)
Rename AbstractType to AbstractTy to avoid a GCC naming conflict after https://reviews.llvm.org/D104234.

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

mlir/include/mlir/IR/Attributes.h
mlir/include/mlir/IR/StorageUniquerSupport.h
mlir/include/mlir/IR/Types.h

index 7a3adf2..590faed 100644 (file)
@@ -31,7 +31,7 @@ public:
 
   using ImplType = AttributeStorage;
   using ValueType = void;
-  using AbstractType = AbstractAttribute;
+  using AbstractTy = AbstractAttribute;
 
   constexpr Attribute() : impl(nullptr) {}
   /* implicit */ Attribute(const ImplType *impl)
@@ -83,7 +83,7 @@ public:
   friend ::llvm::hash_code hash_value(Attribute arg);
 
   /// Return the abstract descriptor for this attribute.
-  const AbstractAttribute &getAbstractAttribute() const {
+  const AbstractTy &getAbstractAttribute() const {
     return impl->getAbstractAttribute();
   }
 
index 02498b7..a670d62 100644 (file)
@@ -93,9 +93,9 @@ public:
   /// call will abort otherwise.
   template <typename... IfaceModels>
   static void attachInterface(MLIRContext &context) {
-    typename ConcreteT::AbstractType *abstract =
-        ConcreteT::AbstractType::lookupMutable(TypeID::get<ConcreteT>(),
-                                               &context);
+    typename ConcreteT::AbstractTy *abstract =
+        ConcreteT::AbstractTy::lookupMutable(TypeID::get<ConcreteT>(),
+                                             &context);
     if (!abstract)
       llvm::report_fatal_error("Registering an interface for an attribute/type "
                                "that is not itself registered.");
index ccebce2..9aeff14 100644 (file)
@@ -79,7 +79,7 @@ public:
 
   using ImplType = TypeStorage;
 
-  using AbstractType = AbstractType;
+  using AbstractTy = AbstractType;
 
   constexpr Type() : impl(nullptr) {}
   /* implicit */ Type(const ImplType *impl)
@@ -170,7 +170,7 @@ public:
   }
 
   /// Return the abstract type descriptor for this type.
-  const AbstractType &getAbstractType() { return impl->getAbstractType(); }
+  const AbstractTy &getAbstractType() { return impl->getAbstractType(); }
 
 protected:
   ImplType *impl;