clang  5.0.0
ARM.h
Go to the documentation of this file.
1 //===--- ARM.h - ARM-specific (not AArch64) Tool Helpers --------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
12 
13 #include "clang/Driver/ToolChain.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/ADT/Triple.h"
16 #include "llvm/Option/Option.h"
17 #include <string>
18 #include <vector>
19 
20 namespace clang {
21 namespace driver {
22 namespace tools {
23 namespace arm {
24 
25 std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch,
26  const llvm::Triple &Triple);
27 const std::string getARMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
28 StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
29 StringRef getLLVMArchSuffixForARM(llvm::StringRef CPU, llvm::StringRef Arch,
30  const llvm::Triple &Triple);
31 
32 void appendEBLinkFlags(const llvm::opt::ArgList &Args,
33  llvm::opt::ArgStringList &CmdArgs,
34  const llvm::Triple &Triple);
35 enum class FloatABI {
36  Invalid,
37  Soft,
38  SoftFP,
39  Hard,
40 };
41 
42 FloatABI getARMFloatABI(const ToolChain &TC, const llvm::opt::ArgList &Args);
43 
44 bool useAAPCSForMachO(const llvm::Triple &T);
45 void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args,
46  llvm::StringRef &Arch, llvm::StringRef &CPU,
47  bool FromAs = false);
48 void getARMTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
49  const llvm::opt::ArgList &Args,
50  llvm::opt::ArgStringList &CmdArgs,
51  std::vector<llvm::StringRef> &Features, bool ForAS);
52 int getARMSubArchVersionNumber(const llvm::Triple &Triple);
53 bool isARMMProfile(const llvm::Triple &Triple);
54 
55 } // end namespace arm
56 } // end namespace tools
57 } // end namespace driver
58 } // end namespace clang
59 
60 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
bool useAAPCSForMachO(const llvm::Triple &T)
Definition: ARM.cpp:119
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:30
StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple)
int getARMSubArchVersionNumber(const llvm::Triple &Triple)
Definition: ARM.cpp:24
void appendEBLinkFlags(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const llvm::Triple &Triple)
std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch, const llvm::Triple &Triple)
void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args, llvm::StringRef &Arch, llvm::StringRef &CPU, bool FromAs=false)
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:50