mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
82 lines
3.2 KiB
Diff
82 lines
3.2 KiB
Diff
From 945a1d5a54ad830f857625417da414d05d367a37 Mon Sep 17 00:00:00 2001
|
|
From: PJ Reiniger <pj.reiniger@gmail.com>
|
|
Date: Sat, 7 May 2022 22:37:34 -0400
|
|
Subject: [PATCH 08/31] 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(-)
|
|
|
|
diff --git a/llvm/include/llvm/ADT/SmallSet.h b/llvm/include/llvm/ADT/SmallSet.h
|
|
index e4c209c5f2a9..f2b402ccf9a0 100644
|
|
--- a/llvm/include/llvm/ADT/SmallSet.h
|
|
+++ b/llvm/include/llvm/ADT/SmallSet.h
|
|
@@ -269,7 +269,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
|
|
- return all_of(LHS, [&RHS](const T &E) { return RHS.count(E); });
|
|
+ return std::all_of(LHS.begin(), LHS.end(), [&RHS](const T &E) { return RHS.count(E); });
|
|
}
|
|
|
|
/// Inequality comparison for SmallSet.
|
|
diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
|
|
index db9fbc148ae3..da843ef79ff9 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 2403db9c80f1..9c0c6fb868f2 100644
|
|
--- a/llvm/lib/Support/ErrorHandling.cpp
|
|
+++ b/llvm/lib/Support/ErrorHandling.cpp
|
|
@@ -210,7 +210,7 @@ void LLVMResetFatalErrorHandler() {
|
|
// I'd rather not double the line count of the following.
|
|
#define MAP_ERR_TO_COND(x, y) \
|
|
case x: \
|
|
- return make_error_code(errc::y)
|
|
+ return std::make_error_code(std::errc::y)
|
|
|
|
std::error_code llvm::mapWindowsError(unsigned EV) {
|
|
switch (EV) {
|
|
diff --git a/llvm/unittests/ADT/SmallPtrSetTest.cpp b/llvm/unittests/ADT/SmallPtrSetTest.cpp
|
|
index 6f3c94eed273..531f81ab5b3f 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));
|
|
+ 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/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp
|
|
index 4c4aec2184b7..5211f01bbd73 100644
|
|
--- a/llvm/unittests/ADT/StringMapTest.cpp
|
|
+++ b/llvm/unittests/ADT/StringMapTest.cpp
|
|
@@ -308,7 +308,7 @@ TEST_F(StringMapTest, IterMapKeys) {
|
|
Map["D"] = 3;
|
|
|
|
auto Keys = to_vector<4>(Map.keys());
|
|
- llvm::sort(Keys);
|
|
+ std::sort(Keys.begin(), Keys.end());
|
|
|
|
SmallVector<std::string_view, 4> Expected = {"A", "B", "C", "D"};
|
|
EXPECT_EQ(Expected, Keys);
|
|
--
|
|
2.20.1.windows.1
|
|
|