xref: /freebsd/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/LoongArch.h (revision 8a4dda33d67586ca2624f2a38417baa03a533a7f)
1bdd1243dSDimitry Andric //===--- LoongArch.h - LoongArch-specific Tool Helpers ----------*- C++ -*-===//
2bdd1243dSDimitry Andric //
3bdd1243dSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4bdd1243dSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5bdd1243dSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6bdd1243dSDimitry Andric //
7bdd1243dSDimitry Andric //===----------------------------------------------------------------------===//
8bdd1243dSDimitry Andric 
9bdd1243dSDimitry Andric #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_LOONGARCH_H
10bdd1243dSDimitry Andric #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_LOONGARCH_H
11bdd1243dSDimitry Andric 
12bdd1243dSDimitry Andric #include "clang/Driver/Driver.h"
13bdd1243dSDimitry Andric #include "llvm/ADT/StringRef.h"
14bdd1243dSDimitry Andric #include "llvm/Option/Option.h"
15bdd1243dSDimitry Andric 
16bdd1243dSDimitry Andric namespace clang {
17bdd1243dSDimitry Andric namespace driver {
18bdd1243dSDimitry Andric namespace tools {
19bdd1243dSDimitry Andric namespace loongarch {
20bdd1243dSDimitry Andric void getLoongArchTargetFeatures(const Driver &D, const llvm::Triple &Triple,
21bdd1243dSDimitry Andric                                 const llvm::opt::ArgList &Args,
22bdd1243dSDimitry Andric                                 std::vector<llvm::StringRef> &Features);
23bdd1243dSDimitry Andric 
24bdd1243dSDimitry Andric StringRef getLoongArchABI(const Driver &D, const llvm::opt::ArgList &Args,
25bdd1243dSDimitry Andric                           const llvm::Triple &Triple);
26*8a4dda33SDimitry Andric 
27*8a4dda33SDimitry Andric std::string postProcessTargetCPUString(const std::string &CPU,
28*8a4dda33SDimitry Andric                                        const llvm::Triple &Triple);
29*8a4dda33SDimitry Andric 
30*8a4dda33SDimitry Andric std::string getLoongArchTargetCPU(const llvm::opt::ArgList &Args,
31*8a4dda33SDimitry Andric                                   const llvm::Triple &Triple);
32bdd1243dSDimitry Andric } // end namespace loongarch
33bdd1243dSDimitry Andric } // end namespace tools
34bdd1243dSDimitry Andric } // end namespace driver
35bdd1243dSDimitry Andric } // end namespace clang
36bdd1243dSDimitry Andric 
37bdd1243dSDimitry Andric #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_LOONGARCH_H
38