#ifndef LLVM_TOOLS_OPT_NEWPMDRIVER_H
#define LLVM_TOOLS_OPT_NEWPMDRIVER_H
#include "llvm/Support/CommandLine.h"
namespace llvm {
class StringRef;
class Module;
class PassPlugin;
class TargetMachine;
class ToolOutputFile;
class TargetLibraryInfoImpl;
extern cl::opt<bool> DebugifyEach;
extern cl::opt<std::string> DebugifyExport;
extern cl::opt<bool> VerifyEachDebugInfoPreserve;
extern cl::opt<std::string> VerifyDIPreserveExport;
namespace opt_tool {
enum OutputKind {
OK_NoOutput,
OK_OutputAssembly,
OK_OutputBitcode,
OK_OutputThinLTOBitcode,
};
enum VerifierKind {
VK_NoVerifier,
VK_VerifyInAndOut,
VK_VerifyEachPass
};
enum PGOKind {
NoPGO,
InstrGen,
InstrUse,
SampleUse
};
enum CSPGOKind { NoCSPGO, CSInstrGen, CSInstrUse };
}
void printPasses(raw_ostream &OS);
bool runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
TargetLibraryInfoImpl *TLII, ToolOutputFile *Out,
ToolOutputFile *ThinLinkOut, ToolOutputFile *OptRemarkFile,
StringRef PassPipeline, ArrayRef<StringRef> PassInfos,
ArrayRef<PassPlugin> PassPlugins, opt_tool::OutputKind OK,
opt_tool::VerifierKind VK,
bool ShouldPreserveAssemblyUseListOrder,
bool ShouldPreserveBitcodeUseListOrder,
bool EmitSummaryIndex, bool EmitModuleHash,
bool EnableDebugify, bool VerifyDIPreserve);
}
#endif