mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
145 lines
4.9 KiB
Diff
145 lines
4.9 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/37] Fixup includes
|
|
|
|
---
|
|
llvm/include/llvm/Support/PointerLikeTypeTraits.h | 1 +
|
|
llvm/lib/Support/ConvertUTFWrapper.cpp | 1 +
|
|
llvm/lib/Support/ErrorHandling.cpp | 9 ++++-----
|
|
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 ++
|
|
7 files changed, 17 insertions(+), 10 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 ea8d60426ead7163550b73e0fdc32cb11bb089cb..5f53ec03a1c1e91659143f12abec145b95627826 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;
|
|
@@ -210,7 +209,7 @@ void LLVMResetFatalErrorHandler() {
|
|
#ifdef _WIN32
|
|
|
|
#define WIN32_NO_STATUS
|
|
-#include "llvm/Support/Windows/WindowsSupport.h"
|
|
+#include "Windows/WindowsSupport.h"
|
|
#undef WIN32_NO_STATUS
|
|
#include <ntstatus.h>
|
|
#include <winerror.h>
|
|
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
|
|
index 7086368a3598ccad9502112f734c9ad81252ebec..e173687cafdd04894c27ccd5efb109a7411f1398 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 a6c2b329f072639706aa221feb8c08e33533f813..4c1a144a7a52eb38c7af2d20749901974b29f962 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>
|