| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | #ifndef LLVM_CLANG_DRIVER_XRAYARGS_H |
| 9 | #define LLVM_CLANG_DRIVER_XRAYARGS_H |
| 10 | |
| 11 | #include "clang/Basic/XRayInstr.h" |
| 12 | #include "clang/Driver/Types.h" |
| 13 | #include "llvm/Option/Arg.h" |
| 14 | #include "llvm/Option/ArgList.h" |
| 15 | |
| 16 | namespace clang { |
| 17 | namespace driver { |
| 18 | |
| 19 | class ToolChain; |
| 20 | |
| 21 | class XRayArgs { |
| 22 | std::vector<std::string> AlwaysInstrumentFiles; |
| 23 | std::vector<std::string> NeverInstrumentFiles; |
| 24 | std::vector<std::string> AttrListFiles; |
| 25 | std::vector<std::string> ; |
| 26 | std::vector<std::string> Modes; |
| 27 | XRayInstrSet InstrumentationBundle; |
| 28 | bool XRayInstrument = false; |
| 29 | int InstructionThreshold = 200; |
| 30 | bool XRayAlwaysEmitCustomEvents = false; |
| 31 | bool XRayAlwaysEmitTypedEvents = false; |
| 32 | bool XRayRT = true; |
| 33 | |
| 34 | public: |
| 35 | |
| 36 | XRayArgs(const ToolChain &TC, const llvm::opt::ArgList &Args); |
| 37 | void addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, |
| 38 | llvm::opt::ArgStringList &CmdArgs, types::ID InputType) const; |
| 39 | |
| 40 | bool needsXRayRt() const { return XRayInstrument && XRayRT; } |
| 41 | llvm::ArrayRef<std::string> modeList() const { return Modes; } |
| 42 | XRayInstrSet instrumentationBundle() const { return InstrumentationBundle; } |
| 43 | }; |
| 44 | |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | #endif |
| 49 | |