File indexing completed on 2026-05-10 08:36:53
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_CLANG_DRIVER_TOOL_H
0010 #define LLVM_CLANG_DRIVER_TOOL_H
0011
0012 #include "clang/Basic/LLVM.h"
0013
0014 namespace llvm {
0015 namespace opt {
0016 class ArgList;
0017 }
0018 }
0019
0020 namespace clang {
0021 namespace driver {
0022
0023 class Compilation;
0024 class InputInfo;
0025 class Job;
0026 class JobAction;
0027 class ToolChain;
0028
0029 typedef SmallVector<InputInfo, 4> InputInfoList;
0030
0031
0032 class Tool {
0033
0034 const char *Name;
0035
0036
0037 const char *ShortName;
0038
0039
0040 const ToolChain &TheToolChain;
0041
0042 public:
0043 Tool(const char *Name, const char *ShortName, const ToolChain &TC);
0044
0045 public:
0046 virtual ~Tool();
0047
0048 const char *getName() const { return Name; }
0049
0050 const char *getShortName() const { return ShortName; }
0051
0052 const ToolChain &getToolChain() const { return TheToolChain; }
0053
0054 virtual bool hasIntegratedAssembler() const { return false; }
0055 virtual bool hasIntegratedBackend() const { return true; }
0056 virtual bool canEmitIR() const { return false; }
0057 virtual bool hasIntegratedCPP() const = 0;
0058 virtual bool isLinkJob() const { return false; }
0059 virtual bool isDsymutilJob() const { return false; }
0060
0061
0062
0063 virtual bool hasGoodDiagnostics() const { return false; }
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073 virtual void ConstructJob(Compilation &C, const JobAction &JA,
0074 const InputInfo &Output,
0075 const InputInfoList &Inputs,
0076 const llvm::opt::ArgList &TCArgs,
0077 const char *LinkingOutput) const = 0;
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087 virtual void ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA,
0088 const InputInfoList &Outputs,
0089 const InputInfoList &Inputs,
0090 const llvm::opt::ArgList &TCArgs,
0091 const char *LinkingOutput) const;
0092 };
0093
0094 }
0095 }
0096
0097 #endif