clang  6.0.0svn
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 ReadTPMode {
36  Invalid,
37  Soft,
38  Cp15,
39 };
40 
41 enum class FloatABI {
42  Invalid,
43  Soft,
44  SoftFP,
45  Hard,
46 };
47 
48 FloatABI getARMFloatABI(const ToolChain &TC, const llvm::opt::ArgList &Args);
49 ReadTPMode getReadTPMode(const ToolChain &TC, const llvm::opt::ArgList &Args);
50 
51 bool useAAPCSForMachO(const llvm::Triple &T);
52 void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args,
53  llvm::StringRef &Arch, llvm::StringRef &CPU,
54  bool FromAs = false);
55 void getARMTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
56  const llvm::opt::ArgList &Args,
57  llvm::opt::ArgStringList &CmdArgs,
58  std::vector<llvm::StringRef> &Features, bool ForAS);
59 int getARMSubArchVersionNumber(const llvm::Triple &Triple);
60 bool isARMMProfile(const llvm::Triple &Triple);
61 
62 } // end namespace arm
63 } // end namespace tools
64 } // end namespace driver
65 } // end namespace clang
66 
67 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
bool useAAPCSForMachO(const llvm::Triple &T)
Definition: ARM.cpp:127
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)
const FunctionProtoType * T
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)
Dataflow Directional Tag Classes.
void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args, llvm::StringRef &Arch, llvm::StringRef &CPU, bool FromAs=false)
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:73