xref: /freebsd/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/RISCV.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
106c3fb27SDimitry Andric //===--- RISCV.h - RISC-V-specific Tool Helpers -----------------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_RISCV_H
100b57cec5SDimitry Andric #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_RISCV_H
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric #include "clang/Driver/Driver.h"
130b57cec5SDimitry Andric #include "llvm/ADT/StringRef.h"
140b57cec5SDimitry Andric #include "llvm/Option/Option.h"
150b57cec5SDimitry Andric #include <string>
160b57cec5SDimitry Andric #include <vector>
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric namespace clang {
190b57cec5SDimitry Andric namespace driver {
200b57cec5SDimitry Andric namespace tools {
210b57cec5SDimitry Andric namespace riscv {
22a7dea167SDimitry Andric void getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple,
23a7dea167SDimitry Andric                             const llvm::opt::ArgList &Args,
240b57cec5SDimitry Andric                             std::vector<llvm::StringRef> &Features);
250b57cec5SDimitry Andric StringRef getRISCVABI(const llvm::opt::ArgList &Args,
260b57cec5SDimitry Andric                       const llvm::Triple &Triple);
27*0fca6ea1SDimitry Andric std::string getRISCVArch(const llvm::opt::ArgList &Args,
28480093f4SDimitry Andric                          const llvm::Triple &Triple);
29bdd1243dSDimitry Andric std::string getRISCVTargetCPU(const llvm::opt::ArgList &Args,
30bdd1243dSDimitry Andric                               const llvm::Triple &Triple);
310b57cec5SDimitry Andric } // end namespace riscv
320b57cec5SDimitry Andric } // namespace tools
330b57cec5SDimitry Andric } // end namespace driver
340b57cec5SDimitry Andric } // end namespace clang
350b57cec5SDimitry Andric 
360b57cec5SDimitry Andric #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_RISCV_H
37