From e847ec4e7e76c64025f186eb24b900cfddb830a3 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 17 Nov 2017 01:00:35 +0000 Subject: [PATCH] Don't #include MemoryBuffer.h from Host.h. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318489 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/StringExtras.h | 1 + include/llvm/DebugInfo/PDB/Native/NativeSession.h | 1 + include/llvm/MC/MCFragment.h | 1 + include/llvm/Support/CodeGenCoverage.h | 1 + include/llvm/Support/Host.h | 1 - lib/DebugInfo/PDB/PDB.cpp | 1 + lib/Support/CodeGenCoverage.cpp | 1 + tools/llvm-mt/llvm-mt.cpp | 1 + tools/llvm-rc/ResourceFileWriter.cpp | 1 + tools/llvm-rc/ResourceFileWriter.h | 3 +++ tools/llvm-rc/llvm-rc.cpp | 1 + 11 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index a01246f910c..37df1659b97 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -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 #include #include diff --git a/include/llvm/DebugInfo/PDB/Native/NativeSession.h b/include/llvm/DebugInfo/PDB/Native/NativeSession.h index f30e344a97f..2e68ced46bf 100644 --- a/include/llvm/DebugInfo/PDB/Native/NativeSession.h +++ b/include/llvm/DebugInfo/PDB/Native/NativeSession.h @@ -22,6 +22,7 @@ #include "llvm/Support/Error.h" namespace llvm { +class MemoryBuffer; namespace pdb { class PDBFile; diff --git a/include/llvm/MC/MCFragment.h b/include/llvm/MC/MCFragment.h index 3d73a027903..7ebde03a758 100644 --- a/include/llvm/MC/MCFragment.h +++ b/include/llvm/MC/MCFragment.h @@ -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 #include diff --git a/include/llvm/Support/CodeGenCoverage.h b/include/llvm/Support/CodeGenCoverage.h index 1aa74fc3bcb..d09c32f2a8a 100644 --- a/include/llvm/Support/CodeGenCoverage.h +++ b/include/llvm/Support/CodeGenCoverage.h @@ -17,6 +17,7 @@ namespace llvm { class LLVMContext; +class MemoryBuffer; class CodeGenCoverage { protected: diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h index f04075038ce..a4b0a340c56 100644 --- a/include/llvm/Support/Host.h +++ b/include/llvm/Support/Host.h @@ -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 diff --git a/lib/DebugInfo/PDB/PDB.cpp b/lib/DebugInfo/PDB/PDB.cpp index c1b21c12036..40f5ae9ba84 100644 --- a/lib/DebugInfo/PDB/PDB.cpp +++ b/lib/DebugInfo/PDB/PDB.cpp @@ -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; diff --git a/lib/Support/CodeGenCoverage.cpp b/lib/Support/CodeGenCoverage.cpp index 5cc84cb96e8..c2308c7d81e 100644 --- a/lib/Support/CodeGenCoverage.cpp +++ b/lib/Support/CodeGenCoverage.cpp @@ -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" diff --git a/tools/llvm-mt/llvm-mt.cpp b/tools/llvm-mt/llvm-mt.cpp index 23cedb056a6..944af22cf9c 100644 --- a/tools/llvm-mt/llvm-mt.cpp +++ b/tools/llvm-mt/llvm-mt.cpp @@ -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" diff --git a/tools/llvm-rc/ResourceFileWriter.cpp b/tools/llvm-rc/ResourceFileWriter.cpp index 85c5217f99f..f141dc7e356 100644 --- a/tools/llvm-rc/ResourceFileWriter.cpp +++ b/tools/llvm-rc/ResourceFileWriter.cpp @@ -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" diff --git a/tools/llvm-rc/ResourceFileWriter.h b/tools/llvm-rc/ResourceFileWriter.h index b06b8cf8a6f..20bd4bd7367 100644 --- a/tools/llvm-rc/ResourceFileWriter.h +++ b/tools/llvm-rc/ResourceFileWriter.h @@ -20,6 +20,9 @@ #include "llvm/Support/Endian.h" namespace llvm { + +class MemoryBuffer; + namespace rc { struct SearchParams { diff --git a/tools/llvm-rc/llvm-rc.cpp b/tools/llvm-rc/llvm-rc.cpp index f82a0dbe0e3..2fab3440e1c 100644 --- a/tools/llvm-rc/llvm-rc.cpp +++ b/tools/llvm-rc/llvm-rc.cpp @@ -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"