Skip to content

Commit e7ed918

Browse files
committed
Revert "Revert "[IR] Remove deprecated PointerType methods that always return true (#74521)""
This reverts commit b9e6132.
1 parent 8d4f75e commit e7ed918

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
@@ -669,9 +669,6 @@ class PointerType : public Type {
669669
return PointerType::get(C, 0);
670670
}
671671

672-
[[deprecated("Always returns true")]]
673-
bool isOpaque() const { return true; }
674-
675672
/// Return true if the specified type is valid as a element type.
676673
static bool isValidElementType(Type *ElemTy);
677674

@@ -681,24 +678,6 @@ class PointerType : public Type {
681678
/// Return the address space of the Pointer type.
682679
inline unsigned getAddressSpace() const { return getSubclassData(); }
683680

684-
/// Return true if either this is an opaque pointer type or if this pointee
685-
/// type matches Ty. Primarily used for checking if an instruction's pointer
686-
/// operands are valid types. Will be useless after non-opaque pointers are
687-
/// removed.
688-
[[deprecated("Always returns true")]]
689-
bool isOpaqueOrPointeeTypeMatches(Type *) {
690-
return true;
691-
}
692-
693-
/// Return true if both pointer types have the same element type. Two opaque
694-
/// pointers are considered to have the same element type, while an opaque
695-
/// and a non-opaque pointer have different element types.
696-
/// TODO: Remove after opaque pointer transition is complete.
697-
[[deprecated("Always returns true")]]
698-
bool hasSameElementTypeAs(PointerType *Other) {
699-
return true;
700-
}
701-
702681
/// Implement support type inquiry through isa, cast, and dyn_cast.
703682
static bool classof(const Type *T) {
704683
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)