This will be used by a new clang builtin __builtin_dynamic_object_size. This builtin is meant to be used as drop-in replacement for __builtin_object_size. When BDOS can't be folded statically, then it computes the object size at runtime. You can see the clang patch here: https://reviews.llvm.org/D56760
rdar://problem/32212419 ER: evaluate builtin_objectsize (or a successor) at runtime, at least when alloc_size is available
Thanks for taking a look!
Erik