Index: llvm/tools/dsymutil/Reproducer.h =================================================================== --- llvm/tools/dsymutil/Reproducer.h +++ llvm/tools/dsymutil/Reproducer.h @@ -9,7 +9,6 @@ #ifndef LLVM_TOOLS_DSYMUTIL_REPRODUCER_H #define LLVM_TOOLS_DSYMUTIL_REPRODUCER_H -#include "llvm/Support/Error.h" #include "llvm/Support/FileCollector.h" #include "llvm/Support/VirtualFileSystem.h" Index: llvm/tools/llvm-exegesis/lib/PerfHelper.h =================================================================== --- llvm/tools/llvm-exegesis/lib/PerfHelper.h +++ llvm/tools/llvm-exegesis/lib/PerfHelper.h @@ -14,7 +14,6 @@ #ifndef LLVM_TOOLS_LLVM_EXEGESIS_PERFHELPER_H #define LLVM_TOOLS_LLVM_EXEGESIS_PERFHELPER_H -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Config/config.h" Index: llvm/tools/llvm-ifs/ErrorCollector.h =================================================================== --- llvm/tools/llvm-ifs/ErrorCollector.h +++ llvm/tools/llvm-ifs/ErrorCollector.h @@ -21,10 +21,13 @@ #ifndef LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H #define LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H -#include "llvm/Support/Error.h" +#include "llvm/Support/raw_ostream.h" #include namespace llvm { + +class Error; + namespace ifs { class ErrorCollector { Index: llvm/tools/llvm-mca/Views/InstructionView.h =================================================================== --- llvm/tools/llvm-mca/Views/InstructionView.h +++ llvm/tools/llvm-mca/Views/InstructionView.h @@ -17,9 +17,10 @@ #include "llvm/MCA/View.h" #include "llvm/Support/JSON.h" -#include "llvm/Support/raw_ostream.h" namespace llvm { +class MCInstPrinter; + namespace mca { // The base class for views that deal with individual machine instructions. Index: llvm/tools/llvm-pdbutil/LinePrinter.h =================================================================== --- llvm/tools/llvm-pdbutil/LinePrinter.h +++ llvm/tools/llvm-pdbutil/LinePrinter.h @@ -9,7 +9,6 @@ #ifndef LLVM_TOOLS_LLVMPDBDUMP_LINEPRINTER_H #define LLVM_TOOLS_LLVMPDBDUMP_LINEPRINTER_H -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/BinaryStreamRef.h" Index: llvm/tools/llvm-pdbutil/OutputStyle.h =================================================================== --- llvm/tools/llvm-pdbutil/OutputStyle.h +++ llvm/tools/llvm-pdbutil/OutputStyle.h @@ -9,9 +9,10 @@ #ifndef LLVM_TOOLS_LLVMPDBDUMP_OUTPUTSTYLE_H #define LLVM_TOOLS_LLVMPDBDUMP_OUTPUTSTYLE_H -#include "llvm/Support/Error.h" - namespace llvm { + +class Error; + namespace pdb { class OutputStyle { Index: llvm/tools/llvm-reduce/DeltaManager.cpp =================================================================== --- llvm/tools/llvm-reduce/DeltaManager.cpp +++ llvm/tools/llvm-reduce/DeltaManager.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#include "ReducerWorkItem.h" #include "DeltaManager.h" #include "TestRunner.h" #include "deltas/Delta.h" Index: llvm/tools/llvm-reduce/ReducerWorkItem.h =================================================================== --- llvm/tools/llvm-reduce/ReducerWorkItem.h +++ llvm/tools/llvm-reduce/ReducerWorkItem.h @@ -9,10 +9,13 @@ #ifndef LLVM_TOOLS_LLVM_REDUCE_REDUCERWORKITEM_H #define LLVM_TOOLS_LLVM_REDUCE_REDUCERWORKITEM_H -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/IR/Module.h" +namespace llvm { + class MachineFunction; + class MachineModuleInfo; +} + using namespace llvm; class ReducerWorkItem { Index: llvm/tools/llvm-reduce/ReducerWorkItem.cpp =================================================================== --- llvm/tools/llvm-reduce/ReducerWorkItem.cpp +++ llvm/tools/llvm-reduce/ReducerWorkItem.cpp @@ -12,6 +12,7 @@ #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/IR/Verifier.h" Index: llvm/tools/llvm-reduce/TestRunner.h =================================================================== --- llvm/tools/llvm-reduce/TestRunner.h +++ llvm/tools/llvm-reduce/TestRunner.h @@ -9,7 +9,6 @@ #ifndef LLVM_TOOLS_LLVM_REDUCE_TESTRUNNER_H #define LLVM_TOOLS_LLVM_REDUCE_TESTRUNNER_H -#include "ReducerWorkItem.h" #include "llvm/ADT/SmallString.h" #include "llvm/IR/Module.h" #include "llvm/Support/Error.h" @@ -18,6 +17,8 @@ #include "llvm/Support/Program.h" #include +class ReducerWorkItem; + namespace llvm { // This class contains all the info necessary for running the provided @@ -35,10 +36,7 @@ /// Returns the most reduced version of the original testcase ReducerWorkItem &getProgram() const { return *Program; } - void setProgram(std::unique_ptr P) { - assert(P && "Setting null program?"); - Program = std::move(P); - } + void setProgram(std::unique_ptr P); private: StringRef TestName; Index: llvm/tools/llvm-reduce/TestRunner.cpp =================================================================== --- llvm/tools/llvm-reduce/TestRunner.cpp +++ llvm/tools/llvm-reduce/TestRunner.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// #include "TestRunner.h" +#include "ReducerWorkItem.h" +#include "llvm/CodeGen/MachineFunction.h" using namespace llvm; @@ -43,3 +45,8 @@ return !Result; } + +void TestRunner::setProgram(std::unique_ptr P) { + assert(P && "Setting null program?"); + Program = std::move(P); +} Index: llvm/tools/llvm-reduce/deltas/Delta.h =================================================================== --- llvm/tools/llvm-reduce/deltas/Delta.h +++ llvm/tools/llvm-reduce/deltas/Delta.h @@ -23,6 +23,8 @@ namespace llvm { +class MachineFunction; + struct Chunk { int Begin; int End; Index: llvm/tools/llvm-reduce/deltas/Delta.cpp =================================================================== --- llvm/tools/llvm-reduce/deltas/Delta.cpp +++ llvm/tools/llvm-reduce/deltas/Delta.cpp @@ -17,6 +17,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Bitcode/BitcodeReader.h" #include "llvm/Bitcode/BitcodeWriter.h" +#include "llvm/CodeGen/MachineFunction.h" #include "llvm/IR/Verifier.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ThreadPool.h" Index: llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp =================================================================== --- llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp +++ llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp @@ -18,6 +18,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/TargetInstrInfo.h" +#include "llvm/ADT/SetVector.h" using namespace llvm; Index: llvm/tools/llvm-reduce/llvm-reduce.cpp =================================================================== --- llvm/tools/llvm-reduce/llvm-reduce.cpp +++ llvm/tools/llvm-reduce/llvm-reduce.cpp @@ -19,6 +19,8 @@ #include "TestRunner.h" #include "llvm/ADT/SmallString.h" #include "llvm/CodeGen/CommandFlags.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Verifier.h" #include "llvm/IRReader/IRReader.h" @@ -28,8 +30,8 @@ #include "llvm/Support/InitLLVM.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/TargetSelect.h" -#include "llvm/Support/raw_ostream.h" #include "llvm/Support/WithColor.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" #include #include Index: llvm/tools/opt/NewPMDriver.h =================================================================== --- llvm/tools/opt/NewPMDriver.h +++ llvm/tools/opt/NewPMDriver.h @@ -20,7 +20,6 @@ #ifndef LLVM_TOOLS_OPT_NEWPMDRIVER_H #define LLVM_TOOLS_OPT_NEWPMDRIVER_H -#include "llvm/ADT/ArrayRef.h" #include "llvm/Support/CommandLine.h" namespace llvm {