aboutsummaryrefslogtreecommitdiff
path: root/libbase/include/core/memory
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-02 11:05:18 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-02 11:05:18 +0800
commit3cba709128fc153533e029226b3f09b1ae7ac18e (patch)
tree6f2d752feb8ecc49bd35fb90146e3e1d4ae4bd6f /libbase/include/core/memory
parent47c262e7ea143311a9fea4b33c0ad24a0bcb83f5 (diff)
downloadrcc-project-3cba709128fc153533e029226b3f09b1ae7ac18e.tar.gz
rcc-project-3cba709128fc153533e029226b3f09b1ae7ac18e.tar.xz
[libbase] Rename public namespace and unreachable symbolsHEADmaster
Diffstat (limited to 'libbase/include/core/memory')
-rw-r--r--libbase/include/core/memory/Alignment.h8
-rw-r--r--libbase/include/core/memory/AllocatorBase.h4
-rw-r--r--libbase/include/core/memory/MemAlloc.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/libbase/include/core/memory/Alignment.h b/libbase/include/core/memory/Alignment.h
index 22299e1..4078cd6 100644
--- a/libbase/include/core/memory/Alignment.h
+++ b/libbase/include/core/memory/Alignment.h
@@ -49,7 +49,7 @@
#include <string>
#endif // NDEBUG
-namespace rcc {
+namespace libbase {
#define ALIGN_CHECK_ISPOSITIVE(decl) \
assert(decl > 0 && (#decl " should be defined"))
@@ -85,7 +85,7 @@ public:
explicit Align(uint64_t Value) {
assert(Value > 0 && "Value must not be 0");
- assert(rcc::isPowerOf2_64(Value) && "Alignment is not a power of 2");
+ assert(libbase::isPowerOf2_64(Value) && "Alignment is not a power of 2");
ShiftValue = Log2_64(Value);
assert(ShiftValue < 64 && "Broken invariant");
}
@@ -146,7 +146,7 @@ public:
constexpr MaybeAlign(std::nullopt_t None) : UP(None) {}
constexpr MaybeAlign(Align Value) : UP(Value) {}
explicit MaybeAlign(uint64_t Value) {
- assert((Value == 0 || rcc::isPowerOf2_64(Value)) &&
+ assert((Value == 0 || libbase::isPowerOf2_64(Value)) &&
"Alignment is neither 0 nor a power of 2");
if (Value)
emplace(Value);
@@ -337,6 +337,6 @@ inline std::string DebugStr(const MaybeAlign &MA) {
#undef ALIGN_CHECK_ISPOSITIVE
-} // namespace rcc
+} // namespace libbase
#endif // LIBBASE_SUPPORT_ALIGNMENT_H_
diff --git a/libbase/include/core/memory/AllocatorBase.h b/libbase/include/core/memory/AllocatorBase.h
index 77cb84b..0f7f9f1 100644
--- a/libbase/include/core/memory/AllocatorBase.h
+++ b/libbase/include/core/memory/AllocatorBase.h
@@ -51,7 +51,7 @@
#include <type_traits>
#include <utility>
-namespace rcc {
+namespace libbase {
/// CRTP base class providing obvious overloads for the core \c
/// Allocate() methods of LLVM-style allocators.
@@ -149,6 +149,6 @@ public:
} // namespace detail
-} // namespace rcc
+} // namespace libbase
#endif // LIBBASE_SUPPORT_ALLOCATORBASE_H
diff --git a/libbase/include/core/memory/MemAlloc.h b/libbase/include/core/memory/MemAlloc.h
index bd98864..7b00ceb 100644
--- a/libbase/include/core/memory/MemAlloc.h
+++ b/libbase/include/core/memory/MemAlloc.h
@@ -41,7 +41,7 @@
#include "core/error/ErrorHandling.h"
#include <cstdlib>
-namespace rcc
+namespace libbase
{
LIBBASE_ATTRIBUTE_RETURNS_NONNULL inline void *
@@ -120,5 +120,5 @@ allocate_buffer (size_t Size, size_t Alignment);
LIBBASE_ABI void
deallocate_buffer (void *Ptr, size_t Size, size_t Alignment);
-} // namespace rcc
+} // namespace libbase
#endif