[libc] [llvm] [libc][NFC] Remove __support/bit.h and use __support/CPP/bit.h instead (PR #73939)

Schrodinger ZHU Yifan via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 11:06:15 PST 2023


================
@@ -37,17 +38,26 @@ class SafeMemSize {
 public:
   LIBC_INLINE_VAR static constexpr size_t MAX_MEM_SIZE =
       static_cast<size_t>(cpp::numeric_limits<type>::max());
+
   LIBC_INLINE explicit SafeMemSize(size_t value)
       : value(value <= MAX_MEM_SIZE ? static_cast<type>(value) : -1) {}
+
+  LIBC_INLINE static constexpr size_t offset_to(size_t val, size_t align) {
----------------
SchrodingerZhu wrote:

I think it is good since `offset_to` indeed related to memory.

https://github.com/llvm/llvm-project/pull/73939


More information about the llvm-commits mailing list