summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/Tools.h')
-rw-r--r--lib/Driver/Tools.h57
1 files changed, 54 insertions, 3 deletions
diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h
index 5aea8258d251..25fe063f7f12 100644
--- a/lib/Driver/Tools.h
+++ b/lib/Driver/Tools.h
@@ -40,7 +40,7 @@ using llvm::opt::ArgStringList;
class LLVM_LIBRARY_VISIBILITY Clang : public Tool {
public:
static const char *getBaseInputName(const llvm::opt::ArgList &Args,
- const InputInfoList &Inputs);
+ const InputInfo &Input);
static const char *getBaseInputStem(const llvm::opt::ArgList &Args,
const InputInfoList &Inputs);
static const char *getDependencyFileName(const llvm::opt::ArgList &Args,
@@ -109,7 +109,8 @@ using llvm::opt::ArgStringList;
ClangAs(const ToolChain &TC) : Tool("clang::as",
"clang integrated assembler", TC,
RF_Full) {}
-
+ void AddMIPSTargetArgs(const llvm::opt::ArgList &Args,
+ llvm::opt::ArgStringList &CmdArgs) const;
bool hasGoodDiagnostics() const override { return true; }
bool hasIntegratedAssembler() const override { return false; }
bool hasIntegratedCPP() const override { return false; }
@@ -225,14 +226,21 @@ namespace hexagon {
namespace arm {
StringRef getARMTargetCPU(const llvm::opt::ArgList &Args,
const llvm::Triple &Triple);
+ const StringRef getARMArch(const llvm::opt::ArgList &Args,
+ const llvm::Triple &Triple);
const char* getARMCPUForMArch(const llvm::opt::ArgList &Args,
const llvm::Triple &Triple);
- const char* getLLVMArchSuffixForARM(StringRef CPU);
+ const char* getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch);
void appendEBLinkFlags(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple);
}
namespace mips {
+ typedef enum {
+ NanLegacy = 1,
+ Nan2008 = 2
+ } NanEncoding;
+ NanEncoding getSupportedNanEncoding(StringRef &CPU);
void getMipsCPUAndABI(const llvm::opt::ArgList &Args,
const llvm::Triple &Triple, StringRef &CPUName,
StringRef &ABIName);
@@ -247,6 +255,22 @@ namespace ppc {
bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value);
}
+ /// cloudabi -- Directly call GNU Binutils linker
+namespace cloudabi {
+class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
+public:
+ Link(const ToolChain &TC) : GnuTool("cloudabi::Link", "linker", TC) {}
+
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+};
+} // end namespace cloudabi
+
namespace darwin {
llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str);
void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str);
@@ -490,6 +514,33 @@ namespace gnutools {
const char *LinkingOutput) const override;
};
}
+
+namespace nacltools {
+ class LLVM_LIBRARY_VISIBILITY AssembleARM : public gnutools::Assemble {
+ public:
+ AssembleARM(const ToolChain &TC) : gnutools::Assemble(TC) {}
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+ };
+ class LLVM_LIBRARY_VISIBILITY Link : public Tool {
+ public:
+ Link(const ToolChain &TC) : Tool("NaCl::Link", "linker", TC) {}
+
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+ };
+}
+
/// minix -- Directly call GNU Binutils assembler and linker
namespace minix {
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {