diff --git a/llvm/tools/dsymutil/Reproducer.h b/llvm/tools/dsymutil/Reproducer.h index e965e1ceda24..a53b97f7ca9f 100644 --- 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 index 19a35595c9af..506917f16cdc 100644 --- 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 index 7217ca3b859e..d3a814b94ae7 100644 --- 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 index cec07eef6a80..ae57246fc35f 100644 --- 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 index da93c32053f3..8cc9016d79a2 100644 --- 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 index ed9d105223db..fa81a6996d5e 100644 --- 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 index fbae2a6ba849..fc247d869e38 100644 --- 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.cpp b/llvm/tools/llvm-reduce/TestRunner.cpp index 6c9299797b35..228e54ac83ad 100644 --- 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 @@ int TestRunner::run(StringRef Filename) { 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/TestRunner.h b/llvm/tools/llvm-reduce/TestRunner.h index 1074902554aa..8c0b843a846b 100644 --- a/llvm/tools/llvm-reduce/TestRunner.h +++ b/llvm/tools/llvm-reduce/TestRunner.h @@ -37,10 +37,7 @@ public: /// 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/deltas/Delta.cpp b/llvm/tools/llvm-reduce/deltas/Delta.cpp index 3533afac0850..94fa1d936653 100644 --- 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/Delta.h b/llvm/tools/llvm-reduce/deltas/Delta.h index 76aaf2504482..016400230a4f 100644 --- 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/ReduceInstructionsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp index 975044901057..f5f74f1bb4d6 100644 --- 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 index 5581745ff22e..362136f26219 100644 --- 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 index 40f40a0bc8c1..16bb205afdca 100644 --- 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 {