diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains/CommonArgs.h')
-rw-r--r-- | clang/lib/Driver/ToolChains/CommonArgs.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.h b/clang/lib/Driver/ToolChains/CommonArgs.h index 84b9d2cf59b4..29dedec9b09c 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.h +++ b/clang/lib/Driver/ToolChains/CommonArgs.h @@ -45,12 +45,6 @@ void AddRunTimeLibs(const ToolChain &TC, const Driver &D, llvm::opt::ArgStringList &CmdArgs, const llvm::opt::ArgList &Args); -void AddHIPLinkerScript(const ToolChain &TC, Compilation &C, - const InputInfo &Output, const InputInfoList &Inputs, - const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs, const JobAction &JA, - const Tool &T); - const char *SplitDebugName(const llvm::opt::ArgList &Args, const InputInfo &Input, const InputInfo &Output); @@ -58,7 +52,7 @@ void SplitDebugInfo(const ToolChain &TC, Compilation &C, const Tool &T, const JobAction &JA, const llvm::opt::ArgList &Args, const InputInfo &Output, const char *OutFile); -void AddGoldPlugin(const ToolChain &ToolChain, const llvm::opt::ArgList &Args, +void addLTOOptions(const ToolChain &ToolChain, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const InputInfo &Output, const InputInfo &Input, bool IsThinLTO); @@ -88,12 +82,18 @@ llvm::opt::Arg *getLastProfileSampleUseArg(const llvm::opt::ArgList &Args); bool isObjCAutoRefCount(const llvm::opt::ArgList &Args); -unsigned getLTOParallelism(const llvm::opt::ArgList &Args, const Driver &D); +llvm::StringRef getLTOParallelism(const llvm::opt::ArgList &Args, + const Driver &D); bool areOptimizationsEnabled(const llvm::opt::ArgList &Args); bool isUseSeparateSections(const llvm::Triple &Triple); +/// \p EnvVar is split by system delimiter for environment variables. +/// If \p ArgName is "-I", "-L", or an empty string, each entry from \p EnvVar +/// is prefixed by \p ArgName then added to \p Args. Otherwise, for each +/// entry of \p EnvVar, \p ArgName is added to \p Args first, then the entry +/// itself is added. void addDirectoryList(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const char *ArgName, const char *EnvVar); @@ -106,10 +106,20 @@ void AddTargetFeature(const llvm::opt::ArgList &Args, std::string getCPUName(const llvm::opt::ArgList &Args, const llvm::Triple &T, bool FromAs = false); +/// Iterate \p Args and convert -mxxx to +xxx and -mno-xxx to -xxx and +/// append it to \p Features. +/// +/// Note: Since \p Features may contain default values before calling +/// this function, or may be appended with entries to override arguments, +/// entries in \p Features are not unique. void handleTargetFeaturesGroup(const llvm::opt::ArgList &Args, std::vector<StringRef> &Features, llvm::opt::OptSpecifier Group); +/// If there are multiple +xxx or -xxx features, keep the last one. +std::vector<StringRef> +unifyTargetFeatures(const std::vector<StringRef> &Features); + /// Handles the -save-stats option and returns the filename to save statistics /// to. SmallString<128> getStatsFileName(const llvm::opt::ArgList &Args, @@ -121,6 +131,8 @@ SmallString<128> getStatsFileName(const llvm::opt::ArgList &Args, void addMultilibFlag(bool Enabled, const char *const Flag, Multilib::flags_list &Flags); +void addX86AlignBranchArgs(const Driver &D, const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs, bool IsLTO); } // end namespace tools } // end namespace driver } // end namespace clang |