[llvm] [MemoryBuiltins] Add getBaseObjectSize() (NFCI) (PR #155911)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 06:28:16 PDT 2025
================
@@ -181,6 +181,13 @@ LLVM_ABI bool getObjectSize(const Value *Ptr, uint64_t &Size,
const DataLayout &DL, const TargetLibraryInfo *TLI,
ObjectSizeOpts Opts = {});
+/// Like getObjectSize(), but only supports base objects (like allocas,
+/// global variables and allocator calls). Requires ExactSizeFromOffset mode.
----------------
fhahn wrote:
```suggestion
/// Like getObjectSize(), but only returns the size of base objects (like allocas,
/// global variables and allocator calls) and std::nullopt otherwise. Requires ExactSizeFromOffset mode.
```
https://github.com/llvm/llvm-project/pull/155911
More information about the llvm-commits
mailing list