summaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains/Arch/RISCV.h
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2018-01-11 13:36:56 +0000
committerAlex Bradbury <asb@lowrisc.org>2018-01-11 13:36:56 +0000
commitfebf5cb710c55169f45f76030b1ebf279dc2991a (patch)
tree5b944bedabb6e5075257e28a14892c723876ee6f /lib/Driver/ToolChains/Arch/RISCV.h
parent998ea35e9f1bfee99dba88619fe53cc838afeddc (diff)
[RISCV] Add the RISCV target and compiler driver
As RV64 codegen has not yet been upstreamed into LLVM, we focus on RV32 driver support (RV64 to follow). Differential Revision: https://reviews.llvm.org/D39963 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Arch/RISCV.h')
-rw-r--r--lib/Driver/ToolChains/Arch/RISCV.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains/Arch/RISCV.h b/lib/Driver/ToolChains/Arch/RISCV.h
new file mode 100644
index 0000000000..beda14979f
--- /dev/null
+++ b/lib/Driver/ToolChains/Arch/RISCV.h
@@ -0,0 +1,32 @@
+//===--- RISCV.h - RISCV-specific Tool Helpers ------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_RISCV_H
+#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_RISCV_H
+
+#include "clang/Driver/Driver.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Option/Option.h"
+#include <string>
+#include <vector>
+
+namespace clang {
+namespace driver {
+namespace tools {
+namespace riscv {
+void getRISCVTargetFeatures(const Driver &D, const llvm::opt::ArgList &Args,
+ std::vector<llvm::StringRef> &Features);
+StringRef getRISCVABI(const llvm::opt::ArgList &Args,
+ const llvm::Triple &Triple);
+} // end namespace riscv
+} // namespace tools
+} // end namespace driver
+} // end namespace clang
+
+#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_RISCV_H