Skip to content

Commit ec871cf

Browse files
authored
[clang][bytecode][NFC] Remove Pointer::elem() (#114046)
Unused.
1 parent 4b44639 commit ec871cf

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

clang/lib/AST/ByteCode/Pointer.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -653,15 +653,6 @@ class Pointer {
653653
return *reinterpret_cast<T *>(asBlockPointer().Pointee->rawData() + Offset);
654654
}
655655

656-
/// Dereferences a primitive element.
657-
template <typename T> T &elem(unsigned I) const {
658-
assert(I < getNumElems());
659-
assert(isBlockPointer());
660-
assert(asBlockPointer().Pointee);
661-
return reinterpret_cast<T *>(asBlockPointer().Pointee->data() +
662-
sizeof(InitMapPtr))[I];
663-
}
664-
665656
/// Whether this block can be read from at all. This is only true for
666657
/// block pointers that point to a valid location inside that block.
667658
bool isDereferencable() const {

0 commit comments

Comments
 (0)