[tools] Forward declare classes & remove includes

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D120208
This commit is contained in:
Clemens Wasser 2022-06-03 16:32:04 -07:00 committed by Fangrui Song
parent 9f819f4c62
commit 42c7f494d9
14 changed files with 25 additions and 11 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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 <vector>
namespace llvm {
class Error;
namespace ifs {
class ErrorCollector {

View File

@ -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.

View File

@ -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 {

View File

@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "DeltaManager.h"
#include "ReducerWorkItem.h"
#include "TestRunner.h"
#include "deltas/Delta.h"
#include "deltas/ReduceAliases.h"

View File

@ -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"

View File

@ -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<ReducerWorkItem> P) {
assert(P && "Setting null program?");
Program = std::move(P);
}

View File

@ -37,10 +37,7 @@ public:
/// Returns the most reduced version of the original testcase
ReducerWorkItem &getProgram() const { return *Program; }
void setProgram(std::unique_ptr<ReducerWorkItem> P) {
assert(P && "Setting null program?");
Program = std::move(P);
}
void setProgram(std::unique_ptr<ReducerWorkItem> P);
const TargetMachine *getTargetMachine() const { return TM.get(); }

View File

@ -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"

View File

@ -23,6 +23,8 @@
namespace llvm {
class MachineFunction;
struct Chunk {
int Begin;
int End;

View File

@ -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"

View File

@ -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"

View File

@ -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 {