[clang] ec871cf - [clang][bytecode][NFC] Remove Pointer::elem() (#114046)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 29 07:00:41 PDT 2024
Author: Timm Baeder
Date: 2024-10-29T15:00:36+01:00
New Revision: ec871cfcdf3a46ca1be9842035e4271524644ed1
URL: https://github.com/llvm/llvm-project/commit/ec871cfcdf3a46ca1be9842035e4271524644ed1
DIFF: https://github.com/llvm/llvm-project/commit/ec871cfcdf3a46ca1be9842035e4271524644ed1.diff
LOG: [clang][bytecode][NFC] Remove Pointer::elem() (#114046)
Unused.
Added:
Modified:
clang/lib/AST/ByteCode/Pointer.h
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h
index 72e255dba13f6b..457fe93b278175 100644
--- a/clang/lib/AST/ByteCode/Pointer.h
+++ b/clang/lib/AST/ByteCode/Pointer.h
@@ -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 {
More information about the cfe-commits
mailing list