Skip to content

[clang][bytecode][NFC] Remove Pointer::elem() #114046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions clang/lib/AST/ByteCode/Pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -653,15 +653,6 @@ class Pointer {
return *reinterpret_cast<T *>(asBlockPointer().Pointee->rawData() + Offset);
}

/// Dereferences a primitive element.
template <typename T> T &elem(unsigned I) const {
assert(I < getNumElems());
assert(isBlockPointer());
assert(asBlockPointer().Pointee);
return reinterpret_cast<T *>(asBlockPointer().Pointee->data() +
sizeof(InitMapPtr))[I];
}

/// Whether this block can be read from at all. This is only true for
/// block pointers that point to a valid location inside that block.
bool isDereferencable() const {
Expand Down
Loading