Skip to content

Commit 07aab4a

Browse files
committed
[DataLayout] Remove getMaxIndexSizeInBits() API
The last use was removed in #119365, and we should not add more uses of this concept in the future either.
1 parent a30e50f commit 07aab4a

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

llvm/include/llvm/IR/DataLayout.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,6 @@ class DataLayout {
365365
return getPointerSpec(AS).BitWidth;
366366
}
367367

368-
/// Returns the maximum index size over all address spaces.
369-
unsigned getMaxIndexSizeInBits() const;
370-
371368
/// Size in bits of index used for address calculation in getelementptr.
372369
unsigned getIndexSizeInBits(unsigned AS) const {
373370
return getPointerSpec(AS).IndexBitWidth;

llvm/lib/IR/DataLayout.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -740,13 +740,6 @@ unsigned DataLayout::getPointerSize(unsigned AS) const {
740740
return divideCeil(getPointerSpec(AS).BitWidth, 8);
741741
}
742742

743-
unsigned DataLayout::getMaxIndexSizeInBits() const {
744-
unsigned MaxIndexSize = 0;
745-
for (const PointerSpec &Spec : PointerSpecs)
746-
MaxIndexSize = std::max(MaxIndexSize, Spec.IndexBitWidth);
747-
return MaxIndexSize;
748-
}
749-
750743
unsigned DataLayout::getPointerTypeSizeInBits(Type *Ty) const {
751744
assert(Ty->isPtrOrPtrVectorTy() &&
752745
"This should only be called with a pointer or pointer vector type");

0 commit comments

Comments
 (0)