[libcxx-commits] [libcxx] [libc++][NFC] Remove some dead code in string (PR #94893)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 9 01:45:47 PDT 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/94893
None
>From 9214b352b061cbdb8ecdf5e391461eb3f92d5e1e Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Sun, 9 Jun 2024 10:45:28 +0200
Subject: [PATCH] [libc++][NFC] Remove some dead code in string
---
libcxx/include/string | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/libcxx/include/string b/libcxx/include/string
index 1db803e822d72..115cebbd9d074 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -868,23 +868,9 @@ private:
static_assert(sizeof(__short) == (sizeof(value_type) * (__min_cap + 1)), "__short has an unexpected size.");
- union __ulx {
- __long __lx;
- __short __lxx;
- };
-
- enum { __n_words = sizeof(__ulx) / sizeof(size_type) };
-
- struct __raw {
- size_type __words[__n_words];
- };
-
- struct __rep {
- union {
- __short __s;
- __long __l;
- __raw __r;
- };
+ union __rep {
+ __short __s;
+ __long __l;
};
__compressed_pair<__rep, allocator_type> __r_;
More information about the libcxx-commits
mailing list