[wpiutil] Upgrade to LLVM 16.0.6 (#5435)

Fixes #5332.
This commit is contained in:
Tyler Veness
2023-07-12 22:50:13 -07:00
committed by GitHub
parent 701df9eb87
commit 828bc5276f
77 changed files with 3798 additions and 1879 deletions

View File

@@ -4,18 +4,18 @@ Date: Sat, 7 May 2022 22:37:34 -0400
Subject: [PATCH 07/30] Explicitly use std::
---
llvm/include/llvm/ADT/SmallSet.h | 2 +-
llvm/include/llvm/Support/MathExtras.h | 2 +-
llvm/lib/Support/ErrorHandling.cpp | 2 +-
llvm/unittests/ADT/SmallPtrSetTest.cpp | 2 +-
llvm/unittests/ADT/StringMapTest.cpp | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
llvm/include/llvm/ADT/SmallSet.h | 2 +-
llvm/lib/Support/ErrorHandling.cpp | 2 +-
llvm/unittests/ADT/SmallPtrSetTest.cpp | 2 +-
llvm/unittests/ADT/SmallSetTest.cpp | 10 +++++-----
llvm/unittests/ADT/StringMapTest.cpp | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/llvm/include/llvm/ADT/SmallSet.h b/llvm/include/llvm/ADT/SmallSet.h
index bfe93e997fc896e82a9b96219967f754df82bcfb..403e108fd361d314762acc317ba6dce7226bb6e5 100644
index 06bc9b5556dd76432552ee79aa916b850f829f4d..630a79c21efeaed6822e7bcad85db0b0d5e42526 100644
--- a/llvm/include/llvm/ADT/SmallSet.h
+++ b/llvm/include/llvm/ADT/SmallSet.h
@@ -270,7 +270,7 @@ bool operator==(const SmallSet<T, LN, C> &LHS, const SmallSet<T, RN, C> &RHS) {
@@ -267,7 +267,7 @@ bool operator==(const SmallSet<T, LN, C> &LHS, const SmallSet<T, RN, C> &RHS) {
return false;
// All elements in LHS must also be in RHS
@@ -24,24 +24,11 @@ index bfe93e997fc896e82a9b96219967f754df82bcfb..403e108fd361d314762acc317ba6dce7
}
/// Inequality comparison for SmallSet.
diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index db9fbc148ae3064faa94a23713d1def3b466e899..da843ef79ff9fd1e2b702763fcdc6f33771bef94 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -586,7 +586,7 @@ inline double Log2(double Value) {
#if defined(__ANDROID_API__) && __ANDROID_API__ < 18
return __builtin_log(Value) / __builtin_log(2.0);
#else
- return log2(Value);
+ return std::log2(Value);
#endif
}
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp
index 89440b5ab872cbeb5e3fbebfa4550e67aea1486b..f80e28e8710817aa19ca7c012a0a4eaecc801c83 100644
index 637b669a7d0dae69ef4b34955f21a9fb8ba1276e..0b87b375de67dc18647e3ebe646bf323dd05e8c5 100644
--- a/llvm/lib/Support/ErrorHandling.cpp
+++ b/llvm/lib/Support/ErrorHandling.cpp
@@ -210,7 +210,7 @@ void LLVMResetFatalErrorHandler() {
@@ -213,7 +213,7 @@ void LLVMResetFatalErrorHandler() {
// I'd rather not double the line count of the following.
#define MAP_ERR_TO_COND(x, y) \
case x: \
@@ -51,20 +38,70 @@ index 89440b5ab872cbeb5e3fbebfa4550e67aea1486b..f80e28e8710817aa19ca7c012a0a4eae
std::error_code llvm::mapWindowsError(unsigned EV) {
switch (EV) {
diff --git a/llvm/unittests/ADT/SmallPtrSetTest.cpp b/llvm/unittests/ADT/SmallPtrSetTest.cpp
index 6f3c94eed2737d4e35995454ec7d007cedb1235a..531f81ab5b3fc1dcff731230f3cb7649cb90aedf 100644
index 7ed8670fd31ea2a14e6ba7f59a8ac8e35046890c..531f81ab5b3fc1dcff731230f3cb7649cb90aedf 100644
--- a/llvm/unittests/ADT/SmallPtrSetTest.cpp
+++ b/llvm/unittests/ADT/SmallPtrSetTest.cpp
@@ -298,7 +298,7 @@ TEST(SmallPtrSetTest, dereferenceAndIterate) {
// Sort. We should hit the first element just once and the final element N
// times.
- llvm::sort(std::begin(Found), std::end(Found));
- llvm::sort(Found);
+ std::sort(std::begin(Found), std::end(Found));
for (auto F = std::begin(Found), E = std::end(Found); F != E; ++F)
EXPECT_EQ(F - Found + 1, *F);
}
diff --git a/llvm/unittests/ADT/SmallSetTest.cpp b/llvm/unittests/ADT/SmallSetTest.cpp
index b50b368ae663614f050c220432c05b32c201db00..f9d84fa8a42a7feaaffa3aa080e84574dc3671b3 100644
--- a/llvm/unittests/ADT/SmallSetTest.cpp
+++ b/llvm/unittests/ADT/SmallSetTest.cpp
@@ -11,8 +11,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/ADT/SmallSet.h"
-#include "llvm/ADT/STLExtras.h"
#include "gtest/gtest.h"
+#include <algorithm>
#include <string>
using namespace llvm;
@@ -94,7 +94,7 @@ TEST(SmallSetTest, IteratorInt) {
std::vector<int> V(s1.begin(), s1.end());
// Make sure the elements are in the expected order.
- llvm::sort(V);
+ std::sort(V.begin(), V.end());
for (int i = 0; i < 3; i++)
EXPECT_EQ(i, V[i]);
@@ -105,7 +105,7 @@ TEST(SmallSetTest, IteratorInt) {
V.assign(s1.begin(), s1.end());
// Make sure the elements are in the expected order.
- llvm::sort(V);
+ std::sort(V.begin(), V.end());
for (int i = 0; i < 6; i++)
EXPECT_EQ(i, V[i]);
}
@@ -120,7 +120,7 @@ TEST(SmallSetTest, IteratorString) {
s1.insert("str 1");
std::vector<std::string> V(s1.begin(), s1.end());
- llvm::sort(V);
+ std::sort(V.begin(), V.end());
EXPECT_EQ(2u, s1.size());
EXPECT_EQ("str 1", V[0]);
EXPECT_EQ("str 2", V[1]);
@@ -131,7 +131,7 @@ TEST(SmallSetTest, IteratorString) {
V.assign(s1.begin(), s1.end());
// Make sure the elements are in the expected order.
- llvm::sort(V);
+ std::sort(V.begin(), V.end());
EXPECT_EQ(4u, s1.size());
EXPECT_EQ("str 0", V[0]);
EXPECT_EQ("str 1", V[1]);
diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp
index 86907ab61a2c24effcef3b88c7849482eadd314d..6d0c0942cdc256a01afbeb1902f53bc9c53198d9 100644
index ff68c66bd1eda0aa4fb78702875ff734557eb07d..d12c585660ba8d00556c37bd1e5e41fbc953acc1 100644
--- a/llvm/unittests/ADT/StringMapTest.cpp
+++ b/llvm/unittests/ADT/StringMapTest.cpp
@@ -329,7 +329,7 @@ TEST_F(StringMapTest, IterMapKeysSmallVector) {