Skip to content

Commit 2e4d158

Browse files
Tobias Gysikiranchandramohan
authored andcommitted
[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
1 parent 14cde52 commit 2e4d158

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mlir/include/mlir/IR/Attributes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Attribute {
3131

3232
using ImplType = AttributeStorage;
3333
using ValueType = void;
34-
using AbstractType = AbstractAttribute;
34+
using AbstractTy = AbstractAttribute;
3535

3636
constexpr Attribute() : impl(nullptr) {}
3737
/* implicit */ Attribute(const ImplType *impl)
@@ -83,7 +83,7 @@ class Attribute {
8383
friend ::llvm::hash_code hash_value(Attribute arg);
8484

8585
/// Return the abstract descriptor for this attribute.
86-
const AbstractAttribute &getAbstractAttribute() const {
86+
const AbstractTy &getAbstractAttribute() const {
8787
return impl->getAbstractAttribute();
8888
}
8989

mlir/include/mlir/IR/StorageUniquerSupport.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ class StorageUserBase : public BaseT, public Traits<ConcreteT>... {
9393
/// call will abort otherwise.
9494
template <typename... IfaceModels>
9595
static void attachInterface(MLIRContext &context) {
96-
typename ConcreteT::AbstractType *abstract =
97-
ConcreteT::AbstractType::lookupMutable(TypeID::get<ConcreteT>(),
98-
&context);
96+
typename ConcreteT::AbstractTy *abstract =
97+
ConcreteT::AbstractTy::lookupMutable(TypeID::get<ConcreteT>(),
98+
&context);
9999
if (!abstract)
100100
llvm::report_fatal_error("Registering an interface for an attribute/type "
101101
"that is not itself registered.");

mlir/include/mlir/IR/Types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Type {
7979

8080
using ImplType = TypeStorage;
8181

82-
using AbstractType = AbstractType;
82+
using AbstractTy = AbstractType;
8383

8484
constexpr Type() : impl(nullptr) {}
8585
/* implicit */ Type(const ImplType *impl)
@@ -170,7 +170,7 @@ class Type {
170170
}
171171

172172
/// Return the abstract type descriptor for this type.
173-
const AbstractType &getAbstractType() { return impl->getAbstractType(); }
173+
const AbstractTy &getAbstractType() { return impl->getAbstractType(); }
174174

175175
protected:
176176
ImplType *impl;

0 commit comments

Comments
 (0)