diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
commit | 6148c19c738a92f344008aa3f88f4e008bada0ee (patch) | |
tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h | |
parent | 2c8643c6396b0a3db33430cf9380e70bbb9efce0 (diff) | |
parent | 173a4f43a911175643bda81ee675e8d9269056ea (diff) | |
download | FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.zip FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.tar.gz |
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h')
-rw-r--r-- | contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h b/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h index c212a83..550e4df 100644 --- a/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h +++ b/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h @@ -11,12 +11,13 @@ #define CLANG_DRIVER_TOOLCHAIN_H_ #include "clang/Driver/Action.h" +#include "clang/Driver/Multilib.h" #include "clang/Driver/Types.h" #include "clang/Driver/Util.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Triple.h" #include "llvm/Support/Path.h" +#include <memory> #include <string> namespace llvm { @@ -65,17 +66,19 @@ private: /// programs. path_list ProgramPaths; - mutable OwningPtr<Tool> Clang; - mutable OwningPtr<Tool> Assemble; - mutable OwningPtr<Tool> Link; + mutable std::unique_ptr<Tool> Clang; + mutable std::unique_ptr<Tool> Assemble; + mutable std::unique_ptr<Tool> Link; Tool *getClang() const; Tool *getAssemble() const; Tool *getLink() const; Tool *getClangAs() const; - mutable OwningPtr<SanitizerArgs> SanitizerArguments; + mutable std::unique_ptr<SanitizerArgs> SanitizerArguments; protected: + MultilibSet Multilibs; + ToolChain(const Driver &D, const llvm::Triple &T, const llvm::opt::ArgList &Args); @@ -127,6 +130,8 @@ public: path_list &getProgramPaths() { return ProgramPaths; } const path_list &getProgramPaths() const { return ProgramPaths; } + const MultilibSet &getMultilibs() const { return Multilibs; } + const SanitizerArgs& getSanitizerArgs() const; // Tool access. @@ -139,7 +144,7 @@ public: virtual llvm::opt::DerivedArgList * TranslateArgs(const llvm::opt::DerivedArgList &Args, const char *BoundArch) const { - return 0; + return nullptr; } /// Choose a tool to use to handle the action \p JA. @@ -150,6 +155,10 @@ public: std::string GetFilePath(const char *Name) const; std::string GetProgramPath(const char *Name) const; + /// Returns the linker path, respecting the -fuse-ld= argument to determine + /// the linker suffix or name. + std::string GetLinkerPath() const; + /// \brief Dispatch to the specific toolchain for verbose printing. /// /// This is used when handling the verbose option to print detailed, @@ -159,6 +168,10 @@ public: // Platform defaults information + /// \brief Returns true if the toolchain is targeting a non-native + /// architecture. + virtual bool isCrossCompiling() const; + /// HasNativeLTOLinker - Check whether the linker and related tools have /// native LLVM support. virtual bool HasNativeLLVMSupport() const; @@ -193,7 +206,7 @@ public: virtual bool UseObjCMixedDispatch() const { return false; } /// GetDefaultStackProtectorLevel - Get the default stack protector level for - /// this tool chain (0=off, 1=on, 2=all). + /// this tool chain (0=off, 1=on, 2=strong, 3=all). virtual unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const { return 0; } @@ -275,6 +288,9 @@ public: virtual void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const; + /// \brief Add warning options that need to be passed to cc1 for this target. + virtual void addClangWarningOptions(llvm::opt::ArgStringList &CC1Args) const; + // GetRuntimeLibType - Determine the runtime library type to use with the // given compilation arguments. virtual RuntimeLibType |