Skip to content

Commit 651a49c

Browse files
authored
[IR] Remove deprecated PointerType methods that always return true (#74521)
1 parent 16c61ca commit 651a49c

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

llvm/include/llvm/IR/DerivedTypes.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -680,9 +680,6 @@ class PointerType : public Type {
680680
return get(PT->getContext(), AddressSpace);
681681
}
682682

683-
[[deprecated("Always returns true")]]
684-
bool isOpaque() const { return true; }
685-
686683
/// Return true if the specified type is valid as a element type.
687684
static bool isValidElementType(Type *ElemTy);
688685

@@ -692,24 +689,6 @@ class PointerType : public Type {
692689
/// Return the address space of the Pointer type.
693690
inline unsigned getAddressSpace() const { return getSubclassData(); }
694691

695-
/// Return true if either this is an opaque pointer type or if this pointee
696-
/// type matches Ty. Primarily used for checking if an instruction's pointer
697-
/// operands are valid types. Will be useless after non-opaque pointers are
698-
/// removed.
699-
[[deprecated("Always returns true")]]
700-
bool isOpaqueOrPointeeTypeMatches(Type *) {
701-
return true;
702-
}
703-
704-
/// Return true if both pointer types have the same element type. Two opaque
705-
/// pointers are considered to have the same element type, while an opaque
706-
/// and a non-opaque pointer have different element types.
707-
/// TODO: Remove after opaque pointer transition is complete.
708-
[[deprecated("Always returns true")]]
709-
bool hasSameElementTypeAs(PointerType *Other) {
710-
return true;
711-
}
712-
713692
/// Implement support type inquiry through isa, cast, and dyn_cast.
714693
static bool classof(const Type *T) {
715694
return T->getTypeID() == PointerTyID;

llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ bool SPIRVEmitIntrinsics::runOnFunction(Function &Func) {
506506
continue;
507507
Type *ElTy = SI->getValueOperand()->getType();
508508
PointerType *PTy = cast<PointerType>(SI->getOperand(1)->getType());
509-
if (ElTy->isAggregateType() || ElTy->isVectorTy() ||
510-
!PTy->isOpaqueOrPointeeTypeMatches(ElTy))
509+
if (ElTy->isAggregateType() || ElTy->isVectorTy())
511510
AggrStores.insert(&I);
512511
}
513512

0 commit comments

Comments
 (0)