mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
As string_view operations on std::map<std::string> won't be integrated until C++26, placeholder implementations are used which are less efficient in a couple of situations (e.g. insert with hint).
136 lines
4.6 KiB
Diff
136 lines
4.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: PJ Reiniger <pj.reiniger@gmail.com>
|
|
Date: Sun, 8 May 2022 16:38:11 -0400
|
|
Subject: [PATCH 16/38] Fixup includes
|
|
|
|
---
|
|
llvm/include/llvm/Support/PointerLikeTypeTraits.h | 1 +
|
|
llvm/lib/Support/ConvertUTFWrapper.cpp | 1 +
|
|
llvm/lib/Support/ErrorHandling.cpp | 7 +++----
|
|
llvm/lib/Support/raw_ostream.cpp | 11 ++++++-----
|
|
llvm/unittests/ADT/SmallPtrSetTest.cpp | 2 ++
|
|
llvm/unittests/ADT/SmallVectorTest.cpp | 1 +
|
|
llvm/unittests/Support/ConvertUTFTest.cpp | 2 ++
|
|
10 files changed, 25 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/llvm/include/llvm/Support/PointerLikeTypeTraits.h b/llvm/include/llvm/Support/PointerLikeTypeTraits.h
|
|
index 1b15f930bd87d97d51824af5e62ea5f222a6b4c9..acadd5e89a1651cfbad67a5b1b0933d1f288d094 100644
|
|
--- a/llvm/include/llvm/Support/PointerLikeTypeTraits.h
|
|
+++ b/llvm/include/llvm/Support/PointerLikeTypeTraits.h
|
|
@@ -16,6 +16,7 @@
|
|
|
|
#include "llvm/Support/DataTypes.h"
|
|
#include <cassert>
|
|
+#include <cstdint>
|
|
#include <type_traits>
|
|
|
|
namespace llvm {
|
|
diff --git a/llvm/lib/Support/ConvertUTFWrapper.cpp b/llvm/lib/Support/ConvertUTFWrapper.cpp
|
|
index d53462e742e61d3476915d5b2c5aa63772e78a8a..34054140489e4d536ace4650207c783d669d850e 100644
|
|
--- a/llvm/lib/Support/ConvertUTFWrapper.cpp
|
|
+++ b/llvm/lib/Support/ConvertUTFWrapper.cpp
|
|
@@ -7,6 +7,7 @@
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Support/ConvertUTF.h"
|
|
+#include "llvm/Support/SmallVector.h"
|
|
#include "llvm/Support/ErrorHandling.h"
|
|
#include "llvm/Support/SwapByteOrder.h"
|
|
#include <span>
|
|
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp
|
|
index 0b87b375de67dc18647e3ebe646bf323dd05e8c5..3a88178cfbbcf7062a958c7de820247bc913ab33 100644
|
|
--- a/llvm/lib/Support/ErrorHandling.cpp
|
|
+++ b/llvm/lib/Support/ErrorHandling.cpp
|
|
@@ -28,12 +28,11 @@
|
|
#include <mutex>
|
|
#include <new>
|
|
|
|
-#if defined(HAVE_UNISTD_H)
|
|
-# include <unistd.h>
|
|
+#ifndef _WIN32
|
|
+#include <unistd.h>
|
|
#endif
|
|
#if defined(_MSC_VER)
|
|
-# include <io.h>
|
|
-# include <fcntl.h>
|
|
+#include <io.h>
|
|
#endif
|
|
|
|
using namespace llvm;
|
|
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
|
|
index 5bec803ccc76ce287b7ff3ea037d5e490a7af20c..ae5428825f7f62ad8e742490448d40aea7506990 100644
|
|
--- a/llvm/lib/Support/raw_ostream.cpp
|
|
+++ b/llvm/lib/Support/raw_ostream.cpp
|
|
@@ -15,6 +15,8 @@
|
|
#endif
|
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
+#include "wpi/SmallString.h"
|
|
+#include "wpi/SmallVector.h"
|
|
#include "llvm/ADT/StringExtras.h"
|
|
#include "llvm/Config/config.h"
|
|
#include "llvm/Support/AutoConvert.h"
|
|
@@ -33,12 +35,11 @@
|
|
#include <sys/stat.h>
|
|
|
|
// <fcntl.h> may provide O_BINARY.
|
|
-#if defined(HAVE_FCNTL_H)
|
|
# include <fcntl.h>
|
|
-#endif
|
|
|
|
-#if defined(HAVE_UNISTD_H)
|
|
-# include <unistd.h>
|
|
+#ifndef _WIN32
|
|
+#include <unistd.h>
|
|
+#include <sys/uio.h>
|
|
#endif
|
|
|
|
#if defined(__CYGWIN__)
|
|
@@ -61,7 +62,7 @@
|
|
#ifdef _WIN32
|
|
#include "llvm/Support/ConvertUTF.h"
|
|
#include "llvm/Support/Signals.h"
|
|
-#include "llvm/Support/Windows/WindowsSupport.h"
|
|
+#include "Windows/WindowsSupport.h"
|
|
#endif
|
|
|
|
using namespace llvm;
|
|
diff --git a/llvm/unittests/ADT/SmallPtrSetTest.cpp b/llvm/unittests/ADT/SmallPtrSetTest.cpp
|
|
index 531f81ab5b3fc1dcff731230f3cb7649cb90aedf..3db8b6e37d31a0a3cc304da8fc4cbbe1d89252b5 100644
|
|
--- a/llvm/unittests/ADT/SmallPtrSetTest.cpp
|
|
+++ b/llvm/unittests/ADT/SmallPtrSetTest.cpp
|
|
@@ -15,6 +15,8 @@
|
|
#include "llvm/Support/PointerLikeTypeTraits.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
+#include <algorithm>
|
|
+
|
|
using namespace llvm;
|
|
|
|
TEST(SmallPtrSetTest, Assignment) {
|
|
diff --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
|
|
index f8c37820ef9fdfe0af067f5aa8d2297ed15e73bc..5e91f71bc9ac0e499a64dd1591e581d0707417f6 100644
|
|
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
|
|
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
|
|
@@ -13,6 +13,7 @@
|
|
#include "llvm/ADT/SmallVector.h"
|
|
#include "llvm/Support/Compiler.h"
|
|
#include "gtest/gtest.h"
|
|
+#include <array>
|
|
#include <list>
|
|
#include <span>
|
|
#include <stdarg.h>
|
|
diff --git a/llvm/unittests/Support/ConvertUTFTest.cpp b/llvm/unittests/Support/ConvertUTFTest.cpp
|
|
index 3b07d344f15a555f11ad5f8177a0a65b8a4fa472..77e70a46d3621ecfaed923d87256184addfda721 100644
|
|
--- a/llvm/unittests/Support/ConvertUTFTest.cpp
|
|
+++ b/llvm/unittests/Support/ConvertUTFTest.cpp
|
|
@@ -7,6 +7,8 @@
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Support/ConvertUTF.h"
|
|
+#include "llvm/Support/SmallString.h"
|
|
+#include "llvm/Support/SmallVector.h"
|
|
#include "gtest/gtest.h"
|
|
#include <string>
|
|
#include <vector>
|