From aedee56e22615868bf14b9a2d9b4b531f179c069 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 26 May 2026 21:55:50 -0700 Subject: [PATCH] [upstream_utils] Add cbegin()/cend()/crbegin()/crend() to SmallVector (#8918) std::vector has these. --- ...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 +- ...lVector-detemplatize-SmallVectorBase.patch | 2 +- .../0011-raw_ostream-add-vector-support.patch | 2 +- .../0012-MathExtras-delete-numbers.patch | 2 +- .../0013-MathExtras-add-Lerp-and-sgn.patch | 2 +- .../llvm_patches/0014-Fixup-includes.patch | 2 +- .../llvm_patches/0015-Windows-support.patch | 2 +- ...ng-remove-call-to-RtlGetLastNtStatus.patch | 2 +- .../0017-ErrorHandling-prefer-fmtlib.patch | 2 +- .../0018-raw_ostream-prefer-wpi-s-fs.h.patch | 2 +- .../0019-Remove-unused-functions.patch | 2 +- ...F-use-SmallVector-for-UTF-conversion.patch | 2 +- ...m-use-static-pointers-in-raw_ostream.patch | 2 +- ...22-Endian-constexpr-endian-byte-swap.patch | 2 +- ...nion-copy-type-traits-from-STLExtras.patch | 2 +- ...eMap-unused-variable-in-release-mode.patch | 2 +- .../0025-Use-C-20-bit-header.patch | 2 +- .../0026-DenseMap-remove-printer-test.patch | 2 +- ...-raw_ostream-Add-SetNumBytesInBuffer.patch | 2 +- ...raw_ostream-Replace-errnoAsErrorCode.patch | 2 +- .../0029-type_traits.h-Add-is_constexpr.patch | 2 +- ...0-raw_ostream-remove-auto-conversion.patch | 2 +- .../0031-SmallVector-add-erase_if.patch | 2 +- ...s-fix-minIntN-and-maxIntN-assertions.patch | 2 +- ...llSetIterator-postincrement-operator.patch | 2 +- ...Vector-add-cbegin-cend-crbegin-crend.patch | 32 +++++++++++++++++++ .../llvm/include/wpi/util/SmallVector.hpp | 4 +++ 35 files changed, 69 insertions(+), 33 deletions(-) create mode 100644 upstream_utils/llvm_patches/0034-SmallVector-add-cbegin-cend-crbegin-crend.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 ba8700fa37..0839cee3b5 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/33] Remove StringRef, ArrayRef, and Optional +Subject: [PATCH 01/34] 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 19dad03dec..193b70becf 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/33] Wrap std::min/max calls in parens, for Windows warnings +Subject: [PATCH 02/34] Wrap std::min/max calls in parens, for Windows warnings --- llvm/include/llvm/ADT/DenseMap.h | 14 +++++++------- diff --git a/upstream_utils/llvm_patches/0003-FunctionExtras-change-unique_function-storage-size.patch b/upstream_utils/llvm_patches/0003-FunctionExtras-change-unique_function-storage-size.patch index 663082b7e3..d47191d178 100644 --- a/upstream_utils/llvm_patches/0003-FunctionExtras-change-unique_function-storage-size.patch +++ b/upstream_utils/llvm_patches/0003-FunctionExtras-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/33] FunctionExtras: change unique_function storage size +Subject: [PATCH 03/34] FunctionExtras: 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 9539e8528b..ed12b604fc 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/33] Threading updates +Subject: [PATCH 04/34] Threading updates - Remove guards for threads and exception - Replace std::lock_guard with std::scoped_lock diff --git a/upstream_utils/llvm_patches/0005-ifdef-guard-safety.patch b/upstream_utils/llvm_patches/0005-ifdef-guard-safety.patch index b5ce14251f..f5b865f92c 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/33] \#ifdef guard safety +Subject: [PATCH 05/34] \#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 adf7562b44..4617bc9f6f 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/33] Explicitly use std:: +Subject: [PATCH 06/34] Explicitly use std:: --- llvm/include/llvm/ADT/DenseMap.h | 11 ++++++----- diff --git a/upstream_utils/llvm_patches/0007-Remove-format_provider.patch b/upstream_utils/llvm_patches/0007-Remove-format_provider.patch index d56171c2b1..2ef267f073 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/33] Remove format_provider +Subject: [PATCH 07/34] Remove format_provider --- llvm/include/llvm/Support/Chrono.h | 126 ------------------------ 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 1aa55d3548..f77a74e108 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/33] Add compiler warning pragmas +Subject: [PATCH 08/34] 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 44a6306121..02e0363dff 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/33] Remove unused functions +Subject: [PATCH 09/34] Remove unused functions --- llvm/include/llvm/ADT/SmallString.h | 77 ------ diff --git a/upstream_utils/llvm_patches/0010-SmallVector-detemplatize-SmallVectorBase.patch b/upstream_utils/llvm_patches/0010-SmallVector-detemplatize-SmallVectorBase.patch index f23af5bf03..a4574de165 100644 --- a/upstream_utils/llvm_patches/0010-SmallVector-detemplatize-SmallVectorBase.patch +++ b/upstream_utils/llvm_patches/0010-SmallVector-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/33] SmallVector: detemplatize SmallVectorBase +Subject: [PATCH 10/34] SmallVector: detemplatize SmallVectorBase --- llvm/include/llvm/ADT/SmallVector.h | 35 ++++++++++------------------- diff --git a/upstream_utils/llvm_patches/0011-raw_ostream-add-vector-support.patch b/upstream_utils/llvm_patches/0011-raw_ostream-add-vector-support.patch index 834400f0ba..d6c37f8c4e 100644 --- a/upstream_utils/llvm_patches/0011-raw_ostream-add-vector-support.patch +++ b/upstream_utils/llvm_patches/0011-raw_ostream-add-vector-support.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/33] raw_ostream: add vector support +Subject: [PATCH 11/34] raw_ostream: add vector support --- llvm/include/llvm/Support/raw_ostream.h | 115 ++++++++++++++++++++++++ diff --git a/upstream_utils/llvm_patches/0012-MathExtras-delete-numbers.patch b/upstream_utils/llvm_patches/0012-MathExtras-delete-numbers.patch index 2ec2a17ece..ec6b82b333 100644 --- a/upstream_utils/llvm_patches/0012-MathExtras-delete-numbers.patch +++ b/upstream_utils/llvm_patches/0012-MathExtras-delete-numbers.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 12/33] MathExtras: delete numbers +Subject: [PATCH 12/34] MathExtras: delete numbers --- llvm/include/llvm/Support/MathExtras.h | 31 -------------------------- diff --git a/upstream_utils/llvm_patches/0013-MathExtras-add-Lerp-and-sgn.patch b/upstream_utils/llvm_patches/0013-MathExtras-add-Lerp-and-sgn.patch index d3482731dc..02939c6ccf 100644 --- a/upstream_utils/llvm_patches/0013-MathExtras-add-Lerp-and-sgn.patch +++ b/upstream_utils/llvm_patches/0013-MathExtras-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 13/33] MathExtras: add Lerp() and sgn() +Subject: [PATCH 13/34] MathExtras: add Lerp() and sgn() --- llvm/include/llvm/Support/MathExtras.h | 21 +++++++++++++++++++++ diff --git a/upstream_utils/llvm_patches/0014-Fixup-includes.patch b/upstream_utils/llvm_patches/0014-Fixup-includes.patch index 78175d6a2f..e730e63d9f 100644 --- a/upstream_utils/llvm_patches/0014-Fixup-includes.patch +++ b/upstream_utils/llvm_patches/0014-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 14/33] Fixup includes +Subject: [PATCH 14/34] Fixup includes --- llvm/include/llvm/Support/PointerLikeTypeTraits.h | 1 + diff --git a/upstream_utils/llvm_patches/0015-Windows-support.patch b/upstream_utils/llvm_patches/0015-Windows-support.patch index d9cb1f0742..7fe4da7e7f 100644 --- a/upstream_utils/llvm_patches/0015-Windows-support.patch +++ b/upstream_utils/llvm_patches/0015-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 15/33] Windows support +Subject: [PATCH 15/34] Windows support --- .../llvm/Support/Windows/WindowsSupport.h | 56 +++++------ diff --git a/upstream_utils/llvm_patches/0016-ErrorHandling-remove-call-to-RtlGetLastNtStatus.patch b/upstream_utils/llvm_patches/0016-ErrorHandling-remove-call-to-RtlGetLastNtStatus.patch index 8be880a72b..3dfc59205c 100644 --- a/upstream_utils/llvm_patches/0016-ErrorHandling-remove-call-to-RtlGetLastNtStatus.patch +++ b/upstream_utils/llvm_patches/0016-ErrorHandling-remove-call-to-RtlGetLastNtStatus.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 17 Sep 2024 21:19:52 -0700 -Subject: [PATCH 16/33] ErrorHandling: remove call to RtlGetLastNtStatus() +Subject: [PATCH 16/34] ErrorHandling: remove call to RtlGetLastNtStatus() --- llvm/lib/Support/ErrorHandling.cpp | 23 ----------------------- diff --git a/upstream_utils/llvm_patches/0017-ErrorHandling-prefer-fmtlib.patch b/upstream_utils/llvm_patches/0017-ErrorHandling-prefer-fmtlib.patch index c20ee4108e..27a2f5c1af 100644 --- a/upstream_utils/llvm_patches/0017-ErrorHandling-prefer-fmtlib.patch +++ b/upstream_utils/llvm_patches/0017-ErrorHandling-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 17/33] ErrorHandling: prefer fmtlib +Subject: [PATCH 17/34] ErrorHandling: prefer fmtlib --- llvm/lib/Support/ErrorHandling.cpp | 19 ++++++------------- diff --git a/upstream_utils/llvm_patches/0018-raw_ostream-prefer-wpi-s-fs.h.patch b/upstream_utils/llvm_patches/0018-raw_ostream-prefer-wpi-s-fs.h.patch index db88f889c3..6eda6a92e4 100644 --- a/upstream_utils/llvm_patches/0018-raw_ostream-prefer-wpi-s-fs.h.patch +++ b/upstream_utils/llvm_patches/0018-raw_ostream-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 18/33] raw_ostream: prefer wpi's fs.h +Subject: [PATCH 18/34] raw_ostream: prefer wpi's fs.h --- llvm/include/llvm/Support/raw_ostream.h | 7 ++----- diff --git a/upstream_utils/llvm_patches/0019-Remove-unused-functions.patch b/upstream_utils/llvm_patches/0019-Remove-unused-functions.patch index 748f8270dc..95a6f776a9 100644 --- a/upstream_utils/llvm_patches/0019-Remove-unused-functions.patch +++ b/upstream_utils/llvm_patches/0019-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 19/33] Remove unused functions +Subject: [PATCH 19/34] Remove unused functions --- llvm/include/llvm/Support/VersionTuple.h | 1 - diff --git a/upstream_utils/llvm_patches/0020-ConvertUTF-use-SmallVector-for-UTF-conversion.patch b/upstream_utils/llvm_patches/0020-ConvertUTF-use-SmallVector-for-UTF-conversion.patch index 59333077ab..8d7bf69908 100644 --- a/upstream_utils/llvm_patches/0020-ConvertUTF-use-SmallVector-for-UTF-conversion.patch +++ b/upstream_utils/llvm_patches/0020-ConvertUTF-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 20/33] ConvertUTF: use SmallVector for UTF conversion +Subject: [PATCH 20/34] ConvertUTF: use SmallVector for UTF conversion --- llvm/include/llvm/Support/ConvertUTF.h | 7 ++++--- diff --git a/upstream_utils/llvm_patches/0021-raw_ostream-use-static-pointers-in-raw_ostream.patch b/upstream_utils/llvm_patches/0021-raw_ostream-use-static-pointers-in-raw_ostream.patch index 71b7472f02..c7e08449a9 100644 --- a/upstream_utils/llvm_patches/0021-raw_ostream-use-static-pointers-in-raw_ostream.patch +++ b/upstream_utils/llvm_patches/0021-raw_ostream-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 21/33] raw_ostream: use static pointers in raw_ostream +Subject: [PATCH 21/34] raw_ostream: use static pointers in raw_ostream See #1401 --- diff --git a/upstream_utils/llvm_patches/0022-Endian-constexpr-endian-byte-swap.patch b/upstream_utils/llvm_patches/0022-Endian-constexpr-endian-byte-swap.patch index 9b1bb78c18..d996071783 100644 --- a/upstream_utils/llvm_patches/0022-Endian-constexpr-endian-byte-swap.patch +++ b/upstream_utils/llvm_patches/0022-Endian-constexpr-endian-byte-swap.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Fri, 1 Mar 2024 11:56:17 -0800 -Subject: [PATCH 22/33] Endian: constexpr endian byte swap +Subject: [PATCH 22/34] Endian: constexpr endian byte swap --- llvm/include/llvm/Support/Endian.h | 4 +++- diff --git a/upstream_utils/llvm_patches/0023-PointerUnion-copy-type-traits-from-STLExtras.patch b/upstream_utils/llvm_patches/0023-PointerUnion-copy-type-traits-from-STLExtras.patch index 6102fff311..2d5bc43ce7 100644 --- a/upstream_utils/llvm_patches/0023-PointerUnion-copy-type-traits-from-STLExtras.patch +++ b/upstream_utils/llvm_patches/0023-PointerUnion-copy-type-traits-from-STLExtras.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 23/33] PointerUnion: copy type traits from STLExtras +Subject: [PATCH 23/34] PointerUnion: copy type traits from STLExtras --- llvm/include/llvm/ADT/PointerUnion.h | 46 ++++++++++++++++++++++++++++ diff --git a/upstream_utils/llvm_patches/0024-DenseMap-unused-variable-in-release-mode.patch b/upstream_utils/llvm_patches/0024-DenseMap-unused-variable-in-release-mode.patch index d58c43e2cc..db1e8032fb 100644 --- a/upstream_utils/llvm_patches/0024-DenseMap-unused-variable-in-release-mode.patch +++ b/upstream_utils/llvm_patches/0024-DenseMap-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 24/33] DenseMap: unused variable in release mode +Subject: [PATCH 24/34] DenseMap: unused variable in release mode --- llvm/include/llvm/ADT/DenseMap.h | 2 +- diff --git a/upstream_utils/llvm_patches/0025-Use-C-20-bit-header.patch b/upstream_utils/llvm_patches/0025-Use-C-20-bit-header.patch index 4c165ca012..3328c90f9c 100644 --- a/upstream_utils/llvm_patches/0025-Use-C-20-bit-header.patch +++ b/upstream_utils/llvm_patches/0025-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 25/33] Use C++20 header +Subject: [PATCH 25/34] Use C++20 header --- llvm/include/llvm/ADT/DenseMap.h | 1 + diff --git a/upstream_utils/llvm_patches/0026-DenseMap-remove-printer-test.patch b/upstream_utils/llvm_patches/0026-DenseMap-remove-printer-test.patch index 69144dc41a..c153ba151e 100644 --- a/upstream_utils/llvm_patches/0026-DenseMap-remove-printer-test.patch +++ b/upstream_utils/llvm_patches/0026-DenseMap-remove-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 26/33] DenseMap: remove printer test +Subject: [PATCH 26/34] DenseMap: remove printer test LLVM modifies internal GTest headers to support it, which we can't do. --- diff --git a/upstream_utils/llvm_patches/0027-raw_ostream-Add-SetNumBytesInBuffer.patch b/upstream_utils/llvm_patches/0027-raw_ostream-Add-SetNumBytesInBuffer.patch index 48807c01d7..f4783cf88c 100644 --- a/upstream_utils/llvm_patches/0027-raw_ostream-Add-SetNumBytesInBuffer.patch +++ b/upstream_utils/llvm_patches/0027-raw_ostream-Add-SetNumBytesInBuffer.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 29 Oct 2023 23:00:08 -0700 -Subject: [PATCH 27/33] raw_ostream: Add SetNumBytesInBuffer +Subject: [PATCH 27/34] raw_ostream: Add SetNumBytesInBuffer --- llvm/include/llvm/Support/raw_ostream.h | 5 +++++ diff --git a/upstream_utils/llvm_patches/0028-raw_ostream-Replace-errnoAsErrorCode.patch b/upstream_utils/llvm_patches/0028-raw_ostream-Replace-errnoAsErrorCode.patch index f76ae0ff4d..5cbd86493c 100644 --- a/upstream_utils/llvm_patches/0028-raw_ostream-Replace-errnoAsErrorCode.patch +++ b/upstream_utils/llvm_patches/0028-raw_ostream-Replace-errnoAsErrorCode.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 17 Sep 2024 15:30:31 -0700 -Subject: [PATCH 28/33] raw_ostream: Replace errnoAsErrorCode() +Subject: [PATCH 28/34] raw_ostream: Replace errnoAsErrorCode() --- llvm/lib/Support/raw_ostream.cpp | 4 ++-- diff --git a/upstream_utils/llvm_patches/0029-type_traits.h-Add-is_constexpr.patch b/upstream_utils/llvm_patches/0029-type_traits.h-Add-is_constexpr.patch index b7d7fb236e..efa9da7663 100644 --- a/upstream_utils/llvm_patches/0029-type_traits.h-Add-is_constexpr.patch +++ b/upstream_utils/llvm_patches/0029-type_traits.h-Add-is_constexpr.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sat, 2 Dec 2023 15:21:32 -0800 -Subject: [PATCH 29/33] type_traits.h: Add is_constexpr() +Subject: [PATCH 29/34] type_traits.h: Add is_constexpr() --- llvm/include/llvm/Support/type_traits.h | 5 +++++ diff --git a/upstream_utils/llvm_patches/0030-raw_ostream-remove-auto-conversion.patch b/upstream_utils/llvm_patches/0030-raw_ostream-remove-auto-conversion.patch index aec8b8c304..da7bbcc062 100644 --- a/upstream_utils/llvm_patches/0030-raw_ostream-remove-auto-conversion.patch +++ b/upstream_utils/llvm_patches/0030-raw_ostream-remove-auto-conversion.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 17 Mar 2024 14:51:11 -0700 -Subject: [PATCH 30/33] raw_ostream: remove auto-conversion +Subject: [PATCH 30/34] raw_ostream: remove auto-conversion --- llvm/lib/Support/raw_ostream.cpp | 13 +------------ diff --git a/upstream_utils/llvm_patches/0031-SmallVector-add-erase_if.patch b/upstream_utils/llvm_patches/0031-SmallVector-add-erase_if.patch index 98f00dac9a..b275907251 100644 --- a/upstream_utils/llvm_patches/0031-SmallVector-add-erase_if.patch +++ b/upstream_utils/llvm_patches/0031-SmallVector-add-erase_if.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 18 Jun 2024 09:07:33 -0700 -Subject: [PATCH 31/33] SmallVector: add erase_if() +Subject: [PATCH 31/34] SmallVector: add erase_if() --- llvm/include/llvm/ADT/SmallVector.h | 8 ++++++++ diff --git a/upstream_utils/llvm_patches/0032-MathExtras-fix-minIntN-and-maxIntN-assertions.patch b/upstream_utils/llvm_patches/0032-MathExtras-fix-minIntN-and-maxIntN-assertions.patch index 425c6e3c89..a3c20450f6 100644 --- a/upstream_utils/llvm_patches/0032-MathExtras-fix-minIntN-and-maxIntN-assertions.patch +++ b/upstream_utils/llvm_patches/0032-MathExtras-fix-minIntN-and-maxIntN-assertions.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Mon, 23 Dec 2024 22:56:29 -0800 -Subject: [PATCH 32/33] MathExtras: fix minIntN() and maxIntN() assertions +Subject: [PATCH 32/34] MathExtras: fix minIntN() and maxIntN() assertions --- llvm/include/llvm/Support/MathExtras.h | 4 ++-- diff --git a/upstream_utils/llvm_patches/0033-SmallSet-add-SmallSetIterator-postincrement-operator.patch b/upstream_utils/llvm_patches/0033-SmallSet-add-SmallSetIterator-postincrement-operator.patch index 1beb57a91b..c50f9044b3 100644 --- a/upstream_utils/llvm_patches/0033-SmallSet-add-SmallSetIterator-postincrement-operator.patch +++ b/upstream_utils/llvm_patches/0033-SmallSet-add-SmallSetIterator-postincrement-operator.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: crueter Date: Wed, 6 May 2026 12:42:53 -0400 -Subject: [PATCH 33/33] SmallSet: add SmallSetIterator postincrement operator +Subject: [PATCH 33/34] SmallSet: add SmallSetIterator postincrement operator Required for Xcode 26.4 --- diff --git a/upstream_utils/llvm_patches/0034-SmallVector-add-cbegin-cend-crbegin-crend.patch b/upstream_utils/llvm_patches/0034-SmallVector-add-cbegin-cend-crbegin-crend.patch new file mode 100644 index 0000000000..e45b33b025 --- /dev/null +++ b/upstream_utils/llvm_patches/0034-SmallVector-add-cbegin-cend-crbegin-crend.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tyler Veness +Date: Tue, 26 May 2026 16:55:28 -0700 +Subject: [PATCH 34/34] SmallVector: add cbegin()/cend()/crbegin()/crend() + +--- + llvm/include/llvm/ADT/SmallVector.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h +index e51771928717625a218981ccd5b9068b63329b02..38d4a23bdd2d46d8b12ccaf27ae44dc6139a54a1 100644 +--- a/llvm/include/llvm/ADT/SmallVector.h ++++ b/llvm/include/llvm/ADT/SmallVector.h +@@ -275,14 +275,18 @@ public: + // forward iterator creation methods. + iterator begin() { return (iterator)this->BeginX; } + const_iterator begin() const { return (const_iterator)this->BeginX; } ++ const_iterator cbegin() const { return (const_iterator)this->BeginX; } + iterator end() { return begin() + size(); } + const_iterator end() const { return begin() + size(); } ++ const_iterator cend() const { return begin() + size(); } + + // reverse iterator creation methods. + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } ++ const_reverse_iterator crbegin() const{ return const_reverse_iterator(end()); } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { return const_reverse_iterator(begin());} ++ const_reverse_iterator crend() const { return const_reverse_iterator(begin());} + + size_type size_in_bytes() const { return size() * sizeof(T); } + size_type max_size() const { diff --git a/wpiutil/src/main/native/thirdparty/llvm/include/wpi/util/SmallVector.hpp b/wpiutil/src/main/native/thirdparty/llvm/include/wpi/util/SmallVector.hpp index 0be61536ed..62181bb509 100644 --- a/wpiutil/src/main/native/thirdparty/llvm/include/wpi/util/SmallVector.hpp +++ b/wpiutil/src/main/native/thirdparty/llvm/include/wpi/util/SmallVector.hpp @@ -275,14 +275,18 @@ public: // forward iterator creation methods. iterator begin() { return (iterator)this->BeginX; } const_iterator begin() const { return (const_iterator)this->BeginX; } + const_iterator cbegin() const { return (const_iterator)this->BeginX; } iterator end() { return begin() + size(); } const_iterator end() const { return begin() + size(); } + const_iterator cend() const { return begin() + size(); } // reverse iterator creation methods. reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } + const_reverse_iterator crbegin() const{ return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin());} + const_reverse_iterator crend() const { return const_reverse_iterator(begin());} size_type size_in_bytes() const { return size() * sizeof(T); } size_type max_size() const {