Don't #include MemoryBuffer.h from Host.h.
authorZachary Turner <zturner@google.com>
Fri, 17 Nov 2017 01:00:35 +0000 (01:00 +0000)
committerZachary Turner <zturner@google.com>
Fri, 17 Nov 2017 01:00:35 +0000 (01:00 +0000)
It turns out this #include isn't used from Host.h anyway,
but by having it it causes circular include dependencies.
This issues only surfaced while I was working on a separate
patch, so I'm submitting this first so that it's independent
of the other, unrelated patch.

llvm-svn: 318489

llvm/include/llvm/ADT/StringExtras.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h
llvm/include/llvm/MC/MCFragment.h
llvm/include/llvm/Support/CodeGenCoverage.h
llvm/include/llvm/Support/Host.h
llvm/lib/DebugInfo/PDB/PDB.cpp
llvm/lib/Support/CodeGenCoverage.cpp
llvm/tools/llvm-mt/llvm-mt.cpp
llvm/tools/llvm-rc/ResourceFileWriter.cpp
llvm/tools/llvm-rc/ResourceFileWriter.h
llvm/tools/llvm-rc/llvm-rc.cpp

index a01246f..37df165 100644 (file)
@@ -17,6 +17,7 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
 #include <cassert>
 #include <cstddef>
 #include <cstdint>
index f30e344..2e68ced 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/Support/Error.h"
 
 namespace llvm {
+class MemoryBuffer;
 namespace pdb {
 class PDBFile;
 
index 3d73a02..7ebde03 100644 (file)
@@ -17,6 +17,7 @@
 #include "llvm/ADT/ilist_node.h"
 #include "llvm/MC/MCFixup.h"
 #include "llvm/MC/MCInst.h"
+#include "llvm/Support/Casting.h"
 #include "llvm/Support/SMLoc.h"
 #include <cstdint>
 #include <utility>
index 1aa74fc..d09c32f 100644 (file)
@@ -17,6 +17,7 @@
 
 namespace llvm {
 class LLVMContext;
+class MemoryBuffer;
 
 class CodeGenCoverage {
 protected:
index f040750..a4b0a34 100644 (file)
@@ -15,7 +15,6 @@
 #define LLVM_SUPPORT_HOST_H
 
 #include "llvm/ADT/StringMap.h"
-#include "llvm/Support/MemoryBuffer.h"
 
 #if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
 #include <endian.h>
index c1b21c1..40f5ae9 100644 (file)
@@ -16,6 +16,7 @@
 #endif
 #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
 #include "llvm/Support/Error.h"
+#include "llvm/Support/MemoryBuffer.h"
 
 using namespace llvm;
 using namespace llvm::pdb;
index 5cc84cb..c2308c7 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Mutex.h"
 #include "llvm/Support/ScopedPrinter.h"
 #include "llvm/Support/ToolOutputFile.h"
index 23cedb0..944af22 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/Support/Error.h"
 #include "llvm/Support/FileOutputBuffer.h"
 #include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Process.h"
index 85c5217..f141dc7 100644 (file)
@@ -17,6 +17,7 @@
 #include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/EndianStream.h"
+#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Process.h"
 
index b06b8cf..20bd4bd 100644 (file)
@@ -20,6 +20,9 @@
 #include "llvm/Support/Endian.h"
 
 namespace llvm {
+
+class MemoryBuffer;
+
 namespace rc {
 
 struct SearchParams {
index f82a0db..2fab344 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/Support/Error.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/Signals.h"