| 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/31] 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 | 11 ++++++----- |
| llvm/unittests/ADT/SmallPtrSetTest.cpp | 2 ++ |
| llvm/unittests/ADT/SmallVectorTest.cpp | 1 + |
| llvm/unittests/ADT/StringMapTest.cpp | 1 + |
| llvm/unittests/Support/ConvertUTFTest.cpp | 2 ++ |
| 10 files changed, 25 insertions(+), 9 deletions(-) |
| |
| diff --git a/llvm/include/llvm/ADT/StringMap.h b/llvm/include/llvm/ADT/StringMap.h |
| index c133e84f9b2e3a225cdac782c011fadbf07adab2..2173a4159111e7fea70325de82dbfce628ae3ea8 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 388e81c361642113937f7d5680de73a50635b07d..011806f5fd89ff738ed805a82b3ddbc6fc9b08ce 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 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 b2a726633b48b179abfd24a5de110a2301e0f877..3b7d8d6db5f0df31e18b91be716a4fd21e7e3549 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/Compiler.h" |
| @@ -32,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 +61,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/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp |
| index acd8b566f9c7a6efc2c9204624c01104dd34daf6..6b6cf564909f329c220eb225f3b7af6c35301029 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 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> |