diff --git a/llvm/tools/dsymutil/Reproducer.h b/llvm/tools/dsymutil/Reproducer.h --- a/llvm/tools/dsymutil/Reproducer.h +++ b/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" diff --git a/llvm/tools/llvm-exegesis/lib/PerfHelper.h b/llvm/tools/llvm-exegesis/lib/PerfHelper.h --- a/llvm/tools/llvm-exegesis/lib/PerfHelper.h +++ b/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" diff --git a/llvm/tools/llvm-ifs/ErrorCollector.h b/llvm/tools/llvm-ifs/ErrorCollector.h --- a/llvm/tools/llvm-ifs/ErrorCollector.h +++ b/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 { diff --git a/llvm/tools/llvm-mca/Views/InstructionView.h b/llvm/tools/llvm-mca/Views/InstructionView.h --- a/llvm/tools/llvm-mca/Views/InstructionView.h +++ b/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. diff --git a/llvm/tools/llvm-pdbutil/OutputStyle.h b/llvm/tools/llvm-pdbutil/OutputStyle.h --- a/llvm/tools/llvm-pdbutil/OutputStyle.h +++ b/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 { diff --git a/llvm/tools/llvm-reduce/DeltaManager.cpp b/llvm/tools/llvm-reduce/DeltaManager.cpp --- a/llvm/tools/llvm-reduce/DeltaManager.cpp +++ b/llvm/tools/llvm-reduce/DeltaManager.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "DeltaManager.h" +#include "ReducerWorkItem.h" #include "TestRunner.h" #include "deltas/Delta.h" #include "deltas/ReduceAliases.h" diff --git a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp --- a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp +++ b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp @@ -14,6 +14,7 @@ #include "llvm/CodeGen/MachineFrameInfo.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" diff --git a/llvm/tools/llvm-reduce/TestRunner.h b/llvm/tools/llvm-reduce/TestRunner.h --- a/llvm/tools/llvm-reduce/TestRunner.h +++ b/llvm/tools/llvm-reduce/TestRunner.h @@ -37,10 +37,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); const TargetMachine *getTargetMachine() const { return TM.get(); } diff --git a/llvm/tools/llvm-reduce/TestRunner.cpp b/llvm/tools/llvm-reduce/TestRunner.cpp --- a/llvm/tools/llvm-reduce/TestRunner.cpp +++ b/llvm/tools/llvm-reduce/TestRunner.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// #include "TestRunner.h" +#include "ReducerWorkItem.h" +#include "llvm/CodeGen/MachineFunction.h" using namespace llvm; @@ -45,3 +47,8 @@ return !Result; } + +void TestRunner::setProgram(std::unique_ptr P) { + assert(P && "Setting null program?"); + Program = std::move(P); +} diff --git a/llvm/tools/llvm-reduce/deltas/Delta.h b/llvm/tools/llvm-reduce/deltas/Delta.h --- a/llvm/tools/llvm-reduce/deltas/Delta.h +++ b/llvm/tools/llvm-reduce/deltas/Delta.h @@ -23,6 +23,8 @@ namespace llvm { +class MachineFunction; + struct Chunk { int Begin; int End; diff --git a/llvm/tools/llvm-reduce/deltas/Delta.cpp b/llvm/tools/llvm-reduce/deltas/Delta.cpp --- a/llvm/tools/llvm-reduce/deltas/Delta.cpp +++ b/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" diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp --- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp +++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp @@ -14,6 +14,7 @@ #include "ReduceInstructionsMIR.h" #include "Delta.h" +#include "llvm/ADT/SetVector.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp --- a/llvm/tools/llvm-reduce/llvm-reduce.cpp +++ b/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" diff --git a/llvm/tools/opt/NewPMDriver.h b/llvm/tools/opt/NewPMDriver.h --- a/llvm/tools/opt/NewPMDriver.h +++ b/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 {