From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- include/clang/Driver/ToolChain.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include/clang/Driver/ToolChain.h') diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h index 11a153c..55be4ee 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h @@ -10,6 +10,7 @@ #ifndef CLANG_DRIVER_TOOLCHAIN_H_ #define CLANG_DRIVER_TOOLCHAIN_H_ +#include "clang/Driver/Types.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Triple.h" #include "llvm/System/Path.h" @@ -17,6 +18,7 @@ namespace clang { namespace driver { + class ArgList; class Compilation; class DerivedArgList; class Driver; @@ -53,6 +55,7 @@ public: const Driver &getDriver() const; const llvm::Triple &getTriple() const { return Triple; } + llvm::Triple::ArchType getArch() const { return Triple.getArch(); } llvm::StringRef getArchName() const { return Triple.getArchName(); } llvm::StringRef getPlatform() const { return Triple.getVendorName(); } llvm::StringRef getOS() const { return Triple.getOSName(); } @@ -89,6 +92,10 @@ public: // Platform defaults information + /// LookupTypeForExtension - Return the default language type to use for the + /// given extension. + virtual types::ID LookupTypeForExtension(const char *Ext) const; + /// IsBlocksDefault - Does this tool chain enable -fblocks by default. virtual bool IsBlocksDefault() const { return false; } @@ -135,6 +142,17 @@ public: /// UseSjLjExceptions - Does this tool chain use SjLj exceptions. virtual bool UseSjLjExceptions() const { return false; } + + /// ComputeLLVMTriple - Return the LLVM target triple to use, after taking + /// command line arguments into account. + virtual std::string ComputeLLVMTriple(const ArgList &Args) const; + + /// ComputeEffectiveClangTriple - Return the Clang triple to use for this + /// target, which may take into account the command line arguments. For + /// example, on Darwin the -mmacosx-version-min= command line argument (which + /// sets the deployment target) determines the version in the triple passed to + /// Clang. + virtual std::string ComputeEffectiveClangTriple(const ArgList &Args) const; }; } // end namespace driver -- cgit v1.1