From 45f33cf9da0cace7fc89c631b542de82b0f36f6c Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Sat, 19 Oct 2019 00:48:11 +0000 Subject: Move endian constant from Host.h to SwapByteOrder.h, prune include Works on this dependency chain: ArrayRef.h -> Hashing.h -> --CUT-- Host.h -> StringMap.h / StringRef.h ArrayRef is very popular, but Host.h is rarely needed. Move the IsBigEndianHost constant to SwapByteOrder.h. Clients of that header are more likely to need it. git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@375316 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/lld/Common/LLVM.h | 1 + include/lld/Core/File.h | 1 + lib/ReaderWriter/MachO/DebugInfo.h | 1 + tools/lld/lld.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/include/lld/Common/LLVM.h b/include/lld/Common/LLVM.h index f7ed1d793..34b7b0d19 100644 --- a/include/lld/Common/LLVM.h +++ b/include/lld/Common/LLVM.h @@ -17,6 +17,7 @@ // This should be the only #include, force #includes of all the others on // clients. #include "llvm/ADT/Hashing.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" #include diff --git a/include/lld/Core/File.h b/include/lld/Core/File.h index 492f35989..df014669e 100644 --- a/include/lld/Core/File.h +++ b/include/lld/Core/File.h @@ -16,6 +16,7 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Twine.h" +#include "llvm/Support/Allocator.h" #include "llvm/Support/ErrorHandling.h" #include #include diff --git a/lib/ReaderWriter/MachO/DebugInfo.h b/lib/ReaderWriter/MachO/DebugInfo.h index 959e10f9a..591dd1eba 100644 --- a/lib/ReaderWriter/MachO/DebugInfo.h +++ b/lib/ReaderWriter/MachO/DebugInfo.h @@ -12,6 +12,7 @@ #include "lld/Core/Atom.h" #include +#include "llvm/Support/Allocator.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" diff --git a/tools/lld/lld.cpp b/tools/lld/lld.cpp index 37ef26049..14dcc9589 100644 --- a/tools/lld/lld.cpp +++ b/tools/lld/lld.cpp @@ -33,6 +33,7 @@ #include "llvm/ADT/Triple.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/Host.h" #include "llvm/Support/InitLLVM.h" #include "llvm/Support/Path.h" #include -- cgit v1.2.3