mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
The main noticeable change is the SmallString conversion operator to std::string is now explicit instead of implicit.
169 lines
5.2 KiB
Diff
169 lines
5.2 KiB
Diff
From aa30b80d86cb0774efc094646339b54694ab8398 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 17/28] Fixup includes
|
|
|
|
---
|
|
llvm/include/llvm/ADT/StringMap.h | 4 ++++
|
|
llvm/include/llvm/ADT/StringMapEntry.h | 4 ++++
|
|
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 | 12 ++++++------
|
|
llvm/unittests/ADT/SmallPtrSetTest.cpp | 2 ++
|
|
llvm/unittests/ADT/StringMapTest.cpp | 1 +
|
|
llvm/unittests/Support/ConvertUTFTest.cpp | 2 ++
|
|
9 files changed, 24 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/llvm/include/llvm/ADT/StringMap.h b/llvm/include/llvm/ADT/StringMap.h
|
|
index 16f13f048..6ae0e39a1 100644
|
|
--- a/llvm/include/llvm/ADT/StringMap.h
|
|
+++ b/llvm/include/llvm/ADT/StringMap.h
|
|
@@ -17,6 +17,10 @@
|
|
#include "llvm/ADT/StringMapEntry.h"
|
|
#include "llvm/ADT/iterator.h"
|
|
#include "llvm/Support/AllocatorBase.h"
|
|
+#include "llvm/Support/MemAlloc.h"
|
|
+#include "llvm/Support/SmallVector.h"
|
|
+#include "llvm/Support/iterator.h"
|
|
+#include "llvm/Support/iterator_range.h"
|
|
#include "llvm/Support/PointerLikeTypeTraits.h"
|
|
#include <initializer_list>
|
|
#include <iterator>
|
|
diff --git a/llvm/include/llvm/ADT/StringMapEntry.h b/llvm/include/llvm/ADT/StringMapEntry.h
|
|
index 39976a02b..cdefc5449 100644
|
|
--- a/llvm/include/llvm/ADT/StringMapEntry.h
|
|
+++ b/llvm/include/llvm/ADT/StringMapEntry.h
|
|
@@ -16,6 +16,10 @@
|
|
#ifndef LLVM_ADT_STRINGMAPENTRY_H
|
|
#define LLVM_ADT_STRINGMAPENTRY_H
|
|
|
|
+#include "wpi/MemAlloc.h"
|
|
+
|
|
+#include <cassert>
|
|
+#include <cstring>
|
|
#include <optional>
|
|
#include <string_view>
|
|
|
|
diff --git a/llvm/include/llvm/Support/PointerLikeTypeTraits.h b/llvm/include/llvm/Support/PointerLikeTypeTraits.h
|
|
index 1b15f930b..acadd5e89 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 396ab0c65..cff30f16c 100644
|
|
--- a/llvm/lib/Support/ConvertUTFWrapper.cpp
|
|
+++ b/llvm/lib/Support/ConvertUTFWrapper.cpp
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#include "llvm/ADT/span.h"
|
|
#include "llvm/Support/ConvertUTF.h"
|
|
+#include "llvm/Support/SmallVector.h"
|
|
#include "llvm/Support/ErrorHandling.h"
|
|
#include "llvm/Support/SwapByteOrder.h"
|
|
#include <string>
|
|
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp
|
|
index f80e28e87..ec1a1633a 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 95152849c..878a3a5e9 100644
|
|
--- a/llvm/lib/Support/raw_ostream.cpp
|
|
+++ b/llvm/lib/Support/raw_ostream.cpp
|
|
@@ -15,7 +15,8 @@
|
|
#endif
|
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
-#include "llvm/ADT/STLArrayExtras.h"
|
|
+#include "wpi/SmallString.h"
|
|
+#include "wpi/SmallVector.h"
|
|
#include "llvm/ADT/StringExtras.h"
|
|
#include "llvm/Config/config.h"
|
|
#include "llvm/Support/Compiler.h"
|
|
@@ -33,12 +34,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__)
|
|
@@ -60,7 +60,7 @@
|
|
|
|
#ifdef _WIN32
|
|
#include "llvm/Support/ConvertUTF.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 531f81ab5..3db8b6e37 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/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp
|
|
index 6d0c0942c..de6daf3da 100644
|
|
--- a/llvm/unittests/ADT/StringMapTest.cpp
|
|
+++ b/llvm/unittests/ADT/StringMapTest.cpp
|
|
@@ -9,6 +9,7 @@
|
|
#include "llvm/ADT/StringMap.h"
|
|
#include "llvm/Support/DataTypes.h"
|
|
#include "gtest/gtest.h"
|
|
+#include <algorithm>
|
|
#include <limits>
|
|
#include <tuple>
|
|
using namespace llvm;
|
|
diff --git a/llvm/unittests/Support/ConvertUTFTest.cpp b/llvm/unittests/Support/ConvertUTFTest.cpp
|
|
index 9c798437a..2fee8ad5c 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>
|