Index: llvm/tools/dsymutil/Reproducer.h =================================================================== --- llvm/tools/dsymutil/Reproducer.h +++ llvm/tools/dsymutil/Reproducer.h @@ -9,6 +9,7 @@ #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,6 +14,7 @@ #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,13 +21,10 @@ #ifndef LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H #define LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H -#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Error.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,10 +17,9 @@ #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,6 +9,7 @@ #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,10 +9,9 @@ #ifndef LLVM_TOOLS_LLVMPDBDUMP_OUTPUTSTYLE_H #define LLVM_TOOLS_LLVMPDBDUMP_OUTPUTSTYLE_H -namespace llvm { - -class Error; +#include "llvm/Support/Error.h" +namespace llvm { namespace pdb { class OutputStyle { Index: llvm/tools/llvm-reduce/DeltaManager.cpp =================================================================== --- llvm/tools/llvm-reduce/DeltaManager.cpp +++ llvm/tools/llvm-reduce/DeltaManager.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// -#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,13 +9,10 @@ #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,7 +12,6 @@ #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,6 +9,7 @@ #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" @@ -17,8 +18,6 @@ #include "llvm/Support/Program.h" #include -class ReducerWorkItem; - namespace llvm { // This class contains all the info necessary for running the provided @@ -36,7 +35,10 @@ /// Returns the most reduced version of the original testcase ReducerWorkItem &getProgram() const { return *Program; } - void setProgram(std::unique_ptr P); + void setProgram(std::unique_ptr P) { + assert(P && "Setting null program?"); + Program = std::move(P); + } private: StringRef TestName; Index: llvm/tools/llvm-reduce/TestRunner.cpp =================================================================== --- llvm/tools/llvm-reduce/TestRunner.cpp +++ llvm/tools/llvm-reduce/TestRunner.cpp @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// #include "TestRunner.h" -#include "ReducerWorkItem.h" -#include "llvm/CodeGen/MachineFunction.h" using namespace llvm; @@ -45,8 +43,3 @@ 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,8 +23,6 @@ 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,7 +17,6 @@ #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,7 +18,6 @@ #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,8 +19,6 @@ #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" @@ -30,8 +28,8 @@ #include "llvm/Support/InitLLVM.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/TargetSelect.h" -#include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/WithColor.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,6 +20,7 @@ #ifndef LLVM_TOOLS_OPT_NEWPMDRIVER_H #define LLVM_TOOLS_OPT_NEWPMDRIVER_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/Support/CommandLine.h" namespace llvm {