[clang] [clang][bytecode][NFC] Remove Pointer::elem() (PR #114046)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 29 06:07:22 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
Unused.
---
Full diff: https://github.com/llvm/llvm-project/pull/114046.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Pointer.h (-9)
``````````diff
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 {
``````````
</details>
https://github.com/llvm/llvm-project/pull/114046
More information about the cfe-commits
mailing list