From 25d256ed8db46dc65f47e83651f0146aa9a4c0ca Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Fri, 15 Sep 2023 18:29:01 -0700 Subject: [PATCH] Fix deprecation warning in LLVM for C++23 --- ...move-StringRef-ArrayRef-and-Optional.patch | 2 +- ...-calls-in-parens-for-Windows-warning.patch | 2 +- ...-Change-unique_function-storage-size.patch | 2 +- .../llvm_patches/0004-Threading-updates.patch | 2 +- .../0005-ifdef-guard-safety.patch | 2 +- .../0006-Explicitly-use-std.patch | 2 +- .../0007-Remove-format_provider.patch | 2 +- .../0008-Add-compiler-warning-pragmas.patch | 2 +- .../0009-Remove-unused-functions.patch | 2 +- .../0010-Detemplatize-SmallVectorBase.patch | 2 +- .../0011-Add-vectors-to-raw_ostream.patch | 2 +- .../0012-Extra-collections-features.patch | 2 +- .../0013-EpochTracker-ABI-macro.patch | 2 +- .../0014-Delete-numbers-from-MathExtras.patch | 2 +- .../llvm_patches/0015-Add-lerp-and-sgn.patch | 2 +- .../llvm_patches/0016-Fixup-includes.patch | 2 +- ...-std-is_trivially_copy_constructible.patch | 2 +- .../llvm_patches/0018-Windows-support.patch | 2 +- .../llvm_patches/0019-Prefer-fmtlib.patch | 2 +- .../llvm_patches/0020-Prefer-wpi-s-fs.h.patch | 2 +- .../0021-Remove-unused-functions.patch | 2 +- .../0022-OS-specific-changes.patch | 2 +- ...3-Use-SmallVector-for-UTF-conversion.patch | 2 +- ...o-use-static-pointers-in-raw_ostream.patch | 2 +- .../0025-constexpr-endian-byte-swap.patch | 2 +- ...-from-STLExtras.h-into-PointerUnion..patch | 2 +- ...-Remove-StringMap-test-for-llvm-sort.patch | 2 +- ...0028-Unused-variable-in-release-mode.patch | 2 +- .../0029-Use-C-20-bit-header.patch | 2 +- ...0-Remove-DenseMap-GTest-printer-test.patch | 2 +- ...ace-deprecated-std-aligned_storage_t.patch | 31 +++++++++++++++++++ upstream_utils/update_llvm.py | 1 + .../llvm/include/wpi/FunctionExtras.h | 4 +-- 33 files changed, 64 insertions(+), 32 deletions(-) create mode 100644 upstream_utils/llvm_patches/0031-Replace-deprecated-std-aligned_storage_t.patch diff --git a/upstream_utils/llvm_patches/0001-Remove-StringRef-ArrayRef-and-Optional.patch b/upstream_utils/llvm_patches/0001-Remove-StringRef-ArrayRef-and-Optional.patch index 1e300ef0df0..48327f82173 100644 --- a/upstream_utils/llvm_patches/0001-Remove-StringRef-ArrayRef-and-Optional.patch +++ b/upstream_utils/llvm_patches/0001-Remove-StringRef-ArrayRef-and-Optional.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 7 May 2022 22:09:18 -0400 -Subject: [PATCH 01/30] Remove StringRef, ArrayRef, and Optional +Subject: [PATCH 01/31] Remove StringRef, ArrayRef, and Optional --- llvm/include/llvm/ADT/PointerUnion.h | 1 - diff --git a/upstream_utils/llvm_patches/0002-Wrap-std-min-max-calls-in-parens-for-Windows-warning.patch b/upstream_utils/llvm_patches/0002-Wrap-std-min-max-calls-in-parens-for-Windows-warning.patch index 56168d5ec1d..fe5c48ef497 100644 --- a/upstream_utils/llvm_patches/0002-Wrap-std-min-max-calls-in-parens-for-Windows-warning.patch +++ b/upstream_utils/llvm_patches/0002-Wrap-std-min-max-calls-in-parens-for-Windows-warning.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 7 May 2022 22:12:41 -0400 -Subject: [PATCH 02/30] Wrap std::min/max calls in parens, for Windows warnings +Subject: [PATCH 02/31] Wrap std::min/max calls in parens, for Windows warnings --- llvm/include/llvm/ADT/DenseMap.h | 4 ++-- diff --git a/upstream_utils/llvm_patches/0003-Change-unique_function-storage-size.patch b/upstream_utils/llvm_patches/0003-Change-unique_function-storage-size.patch index c703134f446..c4e5176663b 100644 --- a/upstream_utils/llvm_patches/0003-Change-unique_function-storage-size.patch +++ b/upstream_utils/llvm_patches/0003-Change-unique_function-storage-size.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 7 May 2022 22:13:55 -0400 -Subject: [PATCH 03/30] Change unique_function storage size +Subject: [PATCH 03/31] Change unique_function storage size --- llvm/include/llvm/ADT/FunctionExtras.h | 4 ++-- diff --git a/upstream_utils/llvm_patches/0004-Threading-updates.patch b/upstream_utils/llvm_patches/0004-Threading-updates.patch index 55b2b4b2dd7..98c1d8ad735 100644 --- a/upstream_utils/llvm_patches/0004-Threading-updates.patch +++ b/upstream_utils/llvm_patches/0004-Threading-updates.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 7 May 2022 22:17:19 -0400 -Subject: [PATCH 04/30] Threading updates +Subject: [PATCH 04/31] Threading updates - Remove guards for threads and exception - Prefer scope gaurd over lock gaurd diff --git a/upstream_utils/llvm_patches/0005-ifdef-guard-safety.patch b/upstream_utils/llvm_patches/0005-ifdef-guard-safety.patch index 2a6d2d6428e..e74cf17593e 100644 --- a/upstream_utils/llvm_patches/0005-ifdef-guard-safety.patch +++ b/upstream_utils/llvm_patches/0005-ifdef-guard-safety.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 7 May 2022 22:28:13 -0400 -Subject: [PATCH 05/30] \#ifdef guard safety +Subject: [PATCH 05/31] \#ifdef guard safety Prevents redefinition if someone is pulling in real LLVM, since the macros are in global namespace --- diff --git a/upstream_utils/llvm_patches/0006-Explicitly-use-std.patch b/upstream_utils/llvm_patches/0006-Explicitly-use-std.patch index 324535de222..0d841d95c74 100644 --- a/upstream_utils/llvm_patches/0006-Explicitly-use-std.patch +++ b/upstream_utils/llvm_patches/0006-Explicitly-use-std.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 7 May 2022 22:37:34 -0400 -Subject: [PATCH 06/30] Explicitly use std:: +Subject: [PATCH 06/31] Explicitly use std:: --- llvm/include/llvm/ADT/SmallSet.h | 2 +- diff --git a/upstream_utils/llvm_patches/0007-Remove-format_provider.patch b/upstream_utils/llvm_patches/0007-Remove-format_provider.patch index 2910f0dddb3..6495bb95935 100644 --- a/upstream_utils/llvm_patches/0007-Remove-format_provider.patch +++ b/upstream_utils/llvm_patches/0007-Remove-format_provider.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 7 May 2022 22:53:50 -0400 -Subject: [PATCH 07/30] Remove format_provider +Subject: [PATCH 07/31] Remove format_provider --- llvm/include/llvm/Support/Chrono.h | 109 ------------------------ diff --git a/upstream_utils/llvm_patches/0008-Add-compiler-warning-pragmas.patch b/upstream_utils/llvm_patches/0008-Add-compiler-warning-pragmas.patch index fd718499092..15442f172fc 100644 --- a/upstream_utils/llvm_patches/0008-Add-compiler-warning-pragmas.patch +++ b/upstream_utils/llvm_patches/0008-Add-compiler-warning-pragmas.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 13:34:07 -0400 -Subject: [PATCH 08/30] Add compiler warning pragmas +Subject: [PATCH 08/31] Add compiler warning pragmas --- llvm/include/llvm/ADT/FunctionExtras.h | 11 +++++++++++ diff --git a/upstream_utils/llvm_patches/0009-Remove-unused-functions.patch b/upstream_utils/llvm_patches/0009-Remove-unused-functions.patch index 9513b042727..13bec69dc9f 100644 --- a/upstream_utils/llvm_patches/0009-Remove-unused-functions.patch +++ b/upstream_utils/llvm_patches/0009-Remove-unused-functions.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 13:43:50 -0400 -Subject: [PATCH 09/30] Remove unused functions +Subject: [PATCH 09/31] Remove unused functions --- llvm/include/llvm/ADT/SmallString.h | 85 +----- diff --git a/upstream_utils/llvm_patches/0010-Detemplatize-SmallVectorBase.patch b/upstream_utils/llvm_patches/0010-Detemplatize-SmallVectorBase.patch index 25e61f77bd7..8d28e0fadea 100644 --- a/upstream_utils/llvm_patches/0010-Detemplatize-SmallVectorBase.patch +++ b/upstream_utils/llvm_patches/0010-Detemplatize-SmallVectorBase.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Thu, 5 May 2022 23:18:34 -0400 -Subject: [PATCH 10/30] Detemplatize SmallVectorBase +Subject: [PATCH 10/31] Detemplatize SmallVectorBase --- llvm/include/llvm/ADT/SmallVector.h | 27 +++++++-------------- diff --git a/upstream_utils/llvm_patches/0011-Add-vectors-to-raw_ostream.patch b/upstream_utils/llvm_patches/0011-Add-vectors-to-raw_ostream.patch index d51bce570b4..cba909f2990 100644 --- a/upstream_utils/llvm_patches/0011-Add-vectors-to-raw_ostream.patch +++ b/upstream_utils/llvm_patches/0011-Add-vectors-to-raw_ostream.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 13:48:59 -0400 -Subject: [PATCH 11/30] Add vectors to raw_ostream +Subject: [PATCH 11/31] Add vectors to raw_ostream --- llvm/include/llvm/Support/raw_ostream.h | 115 ++++++++++++++++++++++++ diff --git a/upstream_utils/llvm_patches/0012-Extra-collections-features.patch b/upstream_utils/llvm_patches/0012-Extra-collections-features.patch index 07d9d4fe8a6..7da2c106a64 100644 --- a/upstream_utils/llvm_patches/0012-Extra-collections-features.patch +++ b/upstream_utils/llvm_patches/0012-Extra-collections-features.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Tue, 3 May 2022 22:16:10 -0400 -Subject: [PATCH 12/30] Extra collections features +Subject: [PATCH 12/31] Extra collections features --- llvm/include/llvm/ADT/StringMap.h | 103 +++++++++++++++++++++++++++++- diff --git a/upstream_utils/llvm_patches/0013-EpochTracker-ABI-macro.patch b/upstream_utils/llvm_patches/0013-EpochTracker-ABI-macro.patch index f48661798bf..a280defac3f 100644 --- a/upstream_utils/llvm_patches/0013-EpochTracker-ABI-macro.patch +++ b/upstream_utils/llvm_patches/0013-EpochTracker-ABI-macro.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Wed, 4 May 2022 00:01:00 -0400 -Subject: [PATCH 13/30] EpochTracker ABI macro +Subject: [PATCH 13/31] EpochTracker ABI macro --- llvm/include/llvm/ADT/EpochTracker.h | 2 +- diff --git a/upstream_utils/llvm_patches/0014-Delete-numbers-from-MathExtras.patch b/upstream_utils/llvm_patches/0014-Delete-numbers-from-MathExtras.patch index 7fb75e32d43..ea27672b2e4 100644 --- a/upstream_utils/llvm_patches/0014-Delete-numbers-from-MathExtras.patch +++ b/upstream_utils/llvm_patches/0014-Delete-numbers-from-MathExtras.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Thu, 5 May 2022 18:09:45 -0400 -Subject: [PATCH 14/30] Delete numbers from MathExtras +Subject: [PATCH 14/31] Delete numbers from MathExtras --- llvm/include/llvm/Support/MathExtras.h | 36 -------------------------- diff --git a/upstream_utils/llvm_patches/0015-Add-lerp-and-sgn.patch b/upstream_utils/llvm_patches/0015-Add-lerp-and-sgn.patch index 0e20b228787..c2fe9ed6430 100644 --- a/upstream_utils/llvm_patches/0015-Add-lerp-and-sgn.patch +++ b/upstream_utils/llvm_patches/0015-Add-lerp-and-sgn.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Tue, 3 May 2022 22:50:24 -0400 -Subject: [PATCH 15/30] Add lerp and sgn +Subject: [PATCH 15/31] Add lerp and sgn --- llvm/include/llvm/Support/MathExtras.h | 20 ++++++++++++++++++++ diff --git a/upstream_utils/llvm_patches/0016-Fixup-includes.patch b/upstream_utils/llvm_patches/0016-Fixup-includes.patch index 91264ac306c..6d32c22203b 100644 --- a/upstream_utils/llvm_patches/0016-Fixup-includes.patch +++ b/upstream_utils/llvm_patches/0016-Fixup-includes.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 16:38:11 -0400 -Subject: [PATCH 16/30] Fixup includes +Subject: [PATCH 16/31] Fixup includes --- llvm/include/llvm/ADT/StringMap.h | 4 ++++ diff --git a/upstream_utils/llvm_patches/0017-Use-std-is_trivially_copy_constructible.patch b/upstream_utils/llvm_patches/0017-Use-std-is_trivially_copy_constructible.patch index 129c01812ae..c78fd427756 100644 --- a/upstream_utils/llvm_patches/0017-Use-std-is_trivially_copy_constructible.patch +++ b/upstream_utils/llvm_patches/0017-Use-std-is_trivially_copy_constructible.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 16:42:09 -0400 -Subject: [PATCH 17/30] Use std::is_trivially_copy_constructible +Subject: [PATCH 17/31] Use std::is_trivially_copy_constructible --- llvm/include/llvm/Support/type_traits.h | 16 ---------------- diff --git a/upstream_utils/llvm_patches/0018-Windows-support.patch b/upstream_utils/llvm_patches/0018-Windows-support.patch index 9658cdb15c7..43e0a071f72 100644 --- a/upstream_utils/llvm_patches/0018-Windows-support.patch +++ b/upstream_utils/llvm_patches/0018-Windows-support.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Tue, 3 May 2022 20:22:38 -0400 -Subject: [PATCH 18/30] Windows support +Subject: [PATCH 18/31] Windows support --- .../llvm/Support/Windows/WindowsSupport.h | 45 +++++---- diff --git a/upstream_utils/llvm_patches/0019-Prefer-fmtlib.patch b/upstream_utils/llvm_patches/0019-Prefer-fmtlib.patch index d1c8ace388d..4d5b81c3cc9 100644 --- a/upstream_utils/llvm_patches/0019-Prefer-fmtlib.patch +++ b/upstream_utils/llvm_patches/0019-Prefer-fmtlib.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 16:46:20 -0400 -Subject: [PATCH 19/30] Prefer fmtlib +Subject: [PATCH 19/31] Prefer fmtlib --- llvm/lib/Support/ErrorHandling.cpp | 20 ++++++-------------- diff --git a/upstream_utils/llvm_patches/0020-Prefer-wpi-s-fs.h.patch b/upstream_utils/llvm_patches/0020-Prefer-wpi-s-fs.h.patch index 8f7959e4394..18ae0e7b8c4 100644 --- a/upstream_utils/llvm_patches/0020-Prefer-wpi-s-fs.h.patch +++ b/upstream_utils/llvm_patches/0020-Prefer-wpi-s-fs.h.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 16:49:36 -0400 -Subject: [PATCH 20/30] Prefer wpi's fs.h +Subject: [PATCH 20/31] Prefer wpi's fs.h --- llvm/include/llvm/Support/raw_ostream.h | 7 ++----- diff --git a/upstream_utils/llvm_patches/0021-Remove-unused-functions.patch b/upstream_utils/llvm_patches/0021-Remove-unused-functions.patch index f184f141fc2..4f6ba93fffa 100644 --- a/upstream_utils/llvm_patches/0021-Remove-unused-functions.patch +++ b/upstream_utils/llvm_patches/0021-Remove-unused-functions.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 19:16:51 -0400 -Subject: [PATCH 21/30] Remove unused functions +Subject: [PATCH 21/31] Remove unused functions --- llvm/include/llvm/Support/raw_ostream.h | 5 +- diff --git a/upstream_utils/llvm_patches/0022-OS-specific-changes.patch b/upstream_utils/llvm_patches/0022-OS-specific-changes.patch index bb463da5a1e..4b3b3b7e25e 100644 --- a/upstream_utils/llvm_patches/0022-OS-specific-changes.patch +++ b/upstream_utils/llvm_patches/0022-OS-specific-changes.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 19:30:43 -0400 -Subject: [PATCH 22/30] OS-specific changes +Subject: [PATCH 22/31] OS-specific changes --- llvm/lib/Support/ErrorHandling.cpp | 16 +++++++--------- diff --git a/upstream_utils/llvm_patches/0023-Use-SmallVector-for-UTF-conversion.patch b/upstream_utils/llvm_patches/0023-Use-SmallVector-for-UTF-conversion.patch index d29816fd60b..d04e93b476e 100644 --- a/upstream_utils/llvm_patches/0023-Use-SmallVector-for-UTF-conversion.patch +++ b/upstream_utils/llvm_patches/0023-Use-SmallVector-for-UTF-conversion.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Mon, 9 May 2022 00:04:30 -0400 -Subject: [PATCH 23/30] Use SmallVector for UTF conversion +Subject: [PATCH 23/31] Use SmallVector for UTF conversion --- llvm/include/llvm/Support/ConvertUTF.h | 6 +++--- diff --git a/upstream_utils/llvm_patches/0024-Prefer-to-use-static-pointers-in-raw_ostream.patch b/upstream_utils/llvm_patches/0024-Prefer-to-use-static-pointers-in-raw_ostream.patch index 14ebeb4a076..f5dce6b5230 100644 --- a/upstream_utils/llvm_patches/0024-Prefer-to-use-static-pointers-in-raw_ostream.patch +++ b/upstream_utils/llvm_patches/0024-Prefer-to-use-static-pointers-in-raw_ostream.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Thu, 19 May 2022 00:58:36 -0400 -Subject: [PATCH 24/30] Prefer to use static pointers in raw_ostream +Subject: [PATCH 24/31] Prefer to use static pointers in raw_ostream See #1401 --- diff --git a/upstream_utils/llvm_patches/0025-constexpr-endian-byte-swap.patch b/upstream_utils/llvm_patches/0025-constexpr-endian-byte-swap.patch index 94b0f60adc4..acbded14803 100644 --- a/upstream_utils/llvm_patches/0025-constexpr-endian-byte-swap.patch +++ b/upstream_utils/llvm_patches/0025-constexpr-endian-byte-swap.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Thu, 19 May 2022 01:12:41 -0400 -Subject: [PATCH 25/30] constexpr endian byte swap +Subject: [PATCH 25/31] constexpr endian byte swap --- llvm/include/llvm/Support/Endian.h | 4 +++- diff --git a/upstream_utils/llvm_patches/0026-Copy-type-traits-from-STLExtras.h-into-PointerUnion..patch b/upstream_utils/llvm_patches/0026-Copy-type-traits-from-STLExtras.h-into-PointerUnion..patch index 3f61db20676..efa9e6cc338 100644 --- a/upstream_utils/llvm_patches/0026-Copy-type-traits-from-STLExtras.h-into-PointerUnion..patch +++ b/upstream_utils/llvm_patches/0026-Copy-type-traits-from-STLExtras.h-into-PointerUnion..patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Wed, 10 Aug 2022 17:07:52 -0700 -Subject: [PATCH 26/30] Copy type traits from STLExtras.h into PointerUnion.h +Subject: [PATCH 26/31] Copy type traits from STLExtras.h into PointerUnion.h --- llvm/include/llvm/ADT/PointerUnion.h | 46 ++++++++++++++++++++++++++++ diff --git a/upstream_utils/llvm_patches/0027-Remove-StringMap-test-for-llvm-sort.patch b/upstream_utils/llvm_patches/0027-Remove-StringMap-test-for-llvm-sort.patch index 4e069d3d957..977dff33838 100644 --- a/upstream_utils/llvm_patches/0027-Remove-StringMap-test-for-llvm-sort.patch +++ b/upstream_utils/llvm_patches/0027-Remove-StringMap-test-for-llvm-sort.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Wed, 10 Aug 2022 22:35:00 -0700 -Subject: [PATCH 27/30] Remove StringMap test for llvm::sort() +Subject: [PATCH 27/31] Remove StringMap test for llvm::sort() --- llvm/unittests/ADT/StringMapTest.cpp | 14 -------------- diff --git a/upstream_utils/llvm_patches/0028-Unused-variable-in-release-mode.patch b/upstream_utils/llvm_patches/0028-Unused-variable-in-release-mode.patch index dbb140cc7a8..2492883e8b9 100644 --- a/upstream_utils/llvm_patches/0028-Unused-variable-in-release-mode.patch +++ b/upstream_utils/llvm_patches/0028-Unused-variable-in-release-mode.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Leander Schulten Date: Mon, 10 Jul 2023 00:53:43 +0200 -Subject: [PATCH 28/30] Unused variable in release mode +Subject: [PATCH 28/31] Unused variable in release mode --- llvm/include/llvm/ADT/DenseMap.h | 2 +- diff --git a/upstream_utils/llvm_patches/0029-Use-C-20-bit-header.patch b/upstream_utils/llvm_patches/0029-Use-C-20-bit-header.patch index b76f0b4f0db..fad61d3e39a 100644 --- a/upstream_utils/llvm_patches/0029-Use-C-20-bit-header.patch +++ b/upstream_utils/llvm_patches/0029-Use-C-20-bit-header.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 11 Jul 2023 22:56:09 -0700 -Subject: [PATCH 29/30] Use C++20 header +Subject: [PATCH 29/31] Use C++20 header --- llvm/include/llvm/ADT/DenseMap.h | 3 +- diff --git a/upstream_utils/llvm_patches/0030-Remove-DenseMap-GTest-printer-test.patch b/upstream_utils/llvm_patches/0030-Remove-DenseMap-GTest-printer-test.patch index c4796d98569..8ee47b8fff8 100644 --- a/upstream_utils/llvm_patches/0030-Remove-DenseMap-GTest-printer-test.patch +++ b/upstream_utils/llvm_patches/0030-Remove-DenseMap-GTest-printer-test.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 30 Jul 2023 14:17:37 -0700 -Subject: [PATCH 30/30] Remove DenseMap GTest printer test +Subject: [PATCH 30/31] Remove DenseMap GTest printer test LLVM modifies internal GTest headers to support it, which we can't do. --- diff --git a/upstream_utils/llvm_patches/0031-Replace-deprecated-std-aligned_storage_t.patch b/upstream_utils/llvm_patches/0031-Replace-deprecated-std-aligned_storage_t.patch new file mode 100644 index 00000000000..e074f273b66 --- /dev/null +++ b/upstream_utils/llvm_patches/0031-Replace-deprecated-std-aligned_storage_t.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tyler Veness +Date: Fri, 15 Sep 2023 18:26:50 -0700 +Subject: [PATCH 31/31] Replace deprecated std::aligned_storage_t + +--- + llvm/include/llvm/ADT/FunctionExtras.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/llvm/include/llvm/ADT/FunctionExtras.h b/llvm/include/llvm/ADT/FunctionExtras.h +index 1daeae915eb506b32a2d1296d2f0fe4e6dab606e..2e60e34d69914bd9b2197fc0a0e75a8e025674b2 100644 +--- a/llvm/include/llvm/ADT/FunctionExtras.h ++++ b/llvm/include/llvm/ADT/FunctionExtras.h +@@ -37,6 +37,7 @@ + #include "llvm/ADT/STLForwardCompat.h" + #include "llvm/Support/MemAlloc.h" + #include "llvm/Support/type_traits.h" ++#include + #include + #include + #include +@@ -167,8 +168,7 @@ protected: + // provide four pointers worth of storage here. + // This is mutable as an inlined `const unique_function` may + // still modify its own mutable members. +- mutable std::aligned_storage_t +- InlineStorage; ++ alignas(void*) mutable std::byte InlineStorage[InlineStorageSize]; + } StorageUnion; + + // A compressed pointer to either our dispatching callback or our table of diff --git a/upstream_utils/update_llvm.py b/upstream_utils/update_llvm.py index 64360b64784..cc7919e0917 100755 --- a/upstream_utils/update_llvm.py +++ b/upstream_utils/update_llvm.py @@ -210,6 +210,7 @@ def main(): "0028-Unused-variable-in-release-mode.patch", "0029-Use-C-20-bit-header.patch", "0030-Remove-DenseMap-GTest-printer-test.patch", + "0031-Replace-deprecated-std-aligned_storage_t.patch", ]: git_am( os.path.join(wpilib_root, "upstream_utils/llvm_patches", f), diff --git a/wpiutil/src/main/native/thirdparty/llvm/include/wpi/FunctionExtras.h b/wpiutil/src/main/native/thirdparty/llvm/include/wpi/FunctionExtras.h index eaa42949196..8c6d8472a2e 100644 --- a/wpiutil/src/main/native/thirdparty/llvm/include/wpi/FunctionExtras.h +++ b/wpiutil/src/main/native/thirdparty/llvm/include/wpi/FunctionExtras.h @@ -37,6 +37,7 @@ #include "wpi/STLForwardCompat.h" #include "wpi/MemAlloc.h" #include "wpi/type_traits.h" +#include #include #include #include @@ -167,8 +168,7 @@ template class UniqueFunctionBase { // provide four pointers worth of storage here. // This is mutable as an inlined `const unique_function` may // still modify its own mutable members. - mutable std::aligned_storage_t - InlineStorage; + alignas(void*) mutable std::byte InlineStorage[InlineStorageSize]; } StorageUnion; // A compressed pointer to either our dispatching callback or our table of