clang  9.0.0svn
ARM.h
Go to the documentation of this file.
1 //===--- ARM.h - ARM-specific (not AArch64) Tool Helpers --------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
11 
12 #include "clang/Driver/ToolChain.h"
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/ADT/Triple.h"
15 #include "llvm/Option/Option.h"
16 #include <string>
17 #include <vector>
18 
19 namespace clang {
20 namespace driver {
21 namespace tools {
22 namespace arm {
23 
24 std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch,
25  const llvm::Triple &Triple);
26 const std::string getARMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
27 StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
28 StringRef getLLVMArchSuffixForARM(llvm::StringRef CPU, llvm::StringRef Arch,
29  const llvm::Triple &Triple);
30 
31 void appendBE8LinkFlag(const llvm::opt::ArgList &Args,
32  llvm::opt::ArgStringList &CmdArgs,
33  const llvm::Triple &Triple);
34 enum class ReadTPMode {
35  Invalid,
36  Soft,
37  Cp15,
38 };
39 
40 enum class FloatABI {
41  Invalid,
42  Soft,
43  SoftFP,
44  Hard,
45 };
46 
47 FloatABI getARMFloatABI(const ToolChain &TC, const llvm::opt::ArgList &Args);
48 ReadTPMode getReadTPMode(const ToolChain &TC, const llvm::opt::ArgList &Args);
49 
50 bool useAAPCSForMachO(const llvm::Triple &T);
51 void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args,
52  llvm::StringRef &Arch, llvm::StringRef &CPU,
53  bool FromAs = false);
54 void getARMTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
55  const llvm::opt::ArgList &Args,
56  llvm::opt::ArgStringList &CmdArgs,
57  std::vector<llvm::StringRef> &Features, bool ForAS);
58 int getARMSubArchVersionNumber(const llvm::Triple &Triple);
59 bool isARMMProfile(const llvm::Triple &Triple);
60 
61 } // end namespace arm
62 } // end namespace tools
63 } // end namespace driver
64 } // end namespace clang
65 
66 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
bool useAAPCSForMachO(const llvm::Triple &T)
Definition: ARM.cpp:126
FloatABI getARMFloatABI(const ToolChain &TC, const llvm::opt::ArgList &Args)
const std::string getARMArch(llvm::StringRef Arch, const llvm::Triple &Triple)
bool isARMMProfile(const llvm::Triple &Triple)
Definition: ARM.cpp:29
StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple)
int getARMSubArchVersionNumber(const llvm::Triple &Triple)
Definition: ARM.cpp:23
std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch, const llvm::Triple &Triple)
Dataflow Directional Tag Classes.
void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args, llvm::StringRef &Arch, llvm::StringRef &CPU, bool FromAs=false)
void appendBE8LinkFlag(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const llvm::Triple &Triple)
ReadTPMode getReadTPMode(const ToolChain &TC, const llvm::opt::ArgList &Args)
void getARMTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, std::vector< llvm::StringRef > &Features, bool ForAS)
StringRef getLLVMArchSuffixForARM(llvm::StringRef CPU, llvm::StringRef Arch, const llvm::Triple &Triple)
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:88