[Mlir-commits] [mlir] e893708 - [mlir] Avoid GCC naming conflict.

Tobias Gysi llvmlistbot at llvm.org
Tue Jun 15 07:49:22 PDT 2021


Author: Tobias Gysi
Date: 2021-06-15T14:48:30Z
New Revision: e893708aac04ece90fd85681c289f1a3b09b52e5

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

LOG: [mlir] Avoid GCC naming conflict.

Rename AbstractType to AbstractTy to avoid a GCC naming conflict after https://reviews.llvm.org/D104234.

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h
index 7a3adf21063f..590faed466a8 100644
--- a/mlir/include/mlir/IR/Attributes.h
+++ b/mlir/include/mlir/IR/Attributes.h
@@ -31,7 +31,7 @@ class Attribute {
 
   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 @@ class Attribute {
   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();
   }
 

diff  --git a/mlir/include/mlir/IR/StorageUniquerSupport.h b/mlir/include/mlir/IR/StorageUniquerSupport.h
index 02498b75f2d5..a670d62eddc2 100644
--- a/mlir/include/mlir/IR/StorageUniquerSupport.h
+++ b/mlir/include/mlir/IR/StorageUniquerSupport.h
@@ -93,9 +93,9 @@ class StorageUserBase : public BaseT, public Traits<ConcreteT>... {
   /// 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.");

diff  --git a/mlir/include/mlir/IR/Types.h b/mlir/include/mlir/IR/Types.h
index ccebce20c2c8..9aeff140d164 100644
--- a/mlir/include/mlir/IR/Types.h
+++ b/mlir/include/mlir/IR/Types.h
@@ -79,7 +79,7 @@ class Type {
 
   using ImplType = TypeStorage;
 
-  using AbstractType = AbstractType;
+  using AbstractTy = AbstractType;
 
   constexpr Type() : impl(nullptr) {}
   /* implicit */ Type(const ImplType *impl)
@@ -170,7 +170,7 @@ class Type {
   }
 
   /// Return the abstract type descriptor for this type.
-  const AbstractType &getAbstractType() { return impl->getAbstractType(); }
+  const AbstractTy &getAbstractType() { return impl->getAbstractType(); }
 
 protected:
   ImplType *impl;


        


More information about the Mlir-commits mailing list