From b05027aaf937714c2767a1fd93c3a5a76874609b Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq@xs4all.nl>
Date: Thu, 7 Apr 2022 22:40:08 +0200
Subject: [PATCH] Revert "[libc++][format] Use a helper constant."

This reverts commit 82427685ea3732665286d5b1c8a1424b1f96164e.

This seems to break the AIX-32 bit build.
---
 libcxx/include/__format/formatter_pointer.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libcxx/include/__format/formatter_pointer.h b/libcxx/include/__format/formatter_pointer.h
index 539992fe866f..aa4fc3398d09 100644
--- a/libcxx/include/__format/formatter_pointer.h
+++ b/libcxx/include/__format/formatter_pointer.h
@@ -46,12 +46,10 @@ public:
     // but that code isn't public. Making that code public requires some
     // refactoring.
     // TODO FMT Remove code duplication.
-    constexpr size_t __max_hex_digits = 2 * sizeof(uintptr_t);
-    char __buffer[2 + __max_hex_digits];
+    char __buffer[2 + 2 * sizeof(uintptr_t)];
     __buffer[0] = '0';
     __buffer[1] = 'x';
-    char* __last =
-        __to_buffer(__buffer + 2, _VSTD::end(__buffer), reinterpret_cast<uintptr_t>(__ptr), __max_hex_digits);
+    char* __last = __to_buffer(__buffer + 2, _VSTD::end(__buffer), reinterpret_cast<uintptr_t>(__ptr), 16);
 
     unsigned __size = __last - __buffer;
     if (__size >= this->__width)
-- 
GitLab