clang 17.0.0git
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
13#include "llvm/ADT/StringRef.h"
14#include "llvm/ADT/Triple.h"
15#include "llvm/Option/Option.h"
16#include "llvm/Support/ARMTargetParser.h"
17#include "llvm/Support/TargetParser.h"
18#include <string>
19#include <vector>
20
21namespace clang {
22namespace driver {
23namespace tools {
24namespace arm {
25
26std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch,
27 const llvm::Triple &Triple);
28std::string getARMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
29StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
30llvm::ARM::ArchKind getLLVMArchKindForARM(StringRef CPU, StringRef Arch,
31 const llvm::Triple &Triple);
32StringRef getLLVMArchSuffixForARM(llvm::StringRef CPU, llvm::StringRef Arch,
33 const llvm::Triple &Triple);
34
35void appendBE8LinkFlag(const llvm::opt::ArgList &Args,
36 llvm::opt::ArgStringList &CmdArgs,
37 const llvm::Triple &Triple);
38enum class ReadTPMode {
39 Invalid,
40 Soft,
41 Cp15,
42};
43
44enum class FloatABI {
45 Invalid,
46 Soft,
47 SoftFP,
48 Hard,
49};
50
51FloatABI getDefaultFloatABI(const llvm::Triple &Triple);
52FloatABI getARMFloatABI(const ToolChain &TC, const llvm::opt::ArgList &Args);
53FloatABI getARMFloatABI(const Driver &D, const llvm::Triple &Triple,
54 const llvm::opt::ArgList &Args);
55void setFloatABIInTriple(const Driver &D, const llvm::opt::ArgList &Args,
56 llvm::Triple &triple);
57bool isHardTPSupported(const llvm::Triple &Triple);
58ReadTPMode getReadTPMode(const Driver &D, const llvm::opt::ArgList &Args,
59 const llvm::Triple &Triple, bool ForAS);
60void setArchNameInTriple(const Driver &D, const llvm::opt::ArgList &Args,
61 types::ID InputType, llvm::Triple &Triple);
62
63bool useAAPCSForMachO(const llvm::Triple &T);
64void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args,
65 llvm::StringRef &Arch, llvm::StringRef &CPU,
66 bool FromAs = false);
67void getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple,
68 const llvm::opt::ArgList &Args,
69 std::vector<llvm::StringRef> &Features, bool ForAS);
70int getARMSubArchVersionNumber(const llvm::Triple &Triple);
71bool isARMMProfile(const llvm::Triple &Triple);
72bool isARMAProfile(const llvm::Triple &Triple);
73
74} // end namespace arm
75} // end namespace tools
76} // end namespace driver
77} // end namespace clang
78
79#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_ARM_H
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:76
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:91
void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args, llvm::StringRef &Arch, llvm::StringRef &CPU, bool FromAs=false)
FloatABI getDefaultFloatABI(const llvm::Triple &Triple)
Definition: ARM.cpp:318
void setArchNameInTriple(const Driver &D, const llvm::opt::ArgList &Args, types::ID InputType, llvm::Triple &Triple)
void appendBE8LinkFlag(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const llvm::Triple &Triple)
void setFloatABIInTriple(const Driver &D, const llvm::opt::ArgList &Args, llvm::Triple &triple)
bool isARMMProfile(const llvm::Triple &Triple)
Definition: ARM.cpp:31
bool isHardTPSupported(const llvm::Triple &Triple)
Definition: ARM.cpp:156
FloatABI getARMFloatABI(const ToolChain &TC, const llvm::opt::ArgList &Args)
bool isARMAProfile(const llvm::Triple &Triple)
Definition: ARM.cpp:37
void getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args, std::vector< llvm::StringRef > &Features, bool ForAS)
bool useAAPCSForMachO(const llvm::Triple &T)
Definition: ARM.cpp:145
std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch, const llvm::Triple &Triple)
StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple)
llvm::ARM::ArchKind getLLVMArchKindForARM(StringRef CPU, StringRef Arch, const llvm::Triple &Triple)
getLLVMArchSuffixForARM - Get the LLVM ArchKind value to use for a particular CPU (or Arch,...
Definition: ARM.cpp:964
int getARMSubArchVersionNumber(const llvm::Triple &Triple)
Definition: ARM.cpp:25
StringRef getLLVMArchSuffixForARM(llvm::StringRef CPU, llvm::StringRef Arch, const llvm::Triple &Triple)
std::string getARMArch(llvm::StringRef Arch, const llvm::Triple &Triple)
ReadTPMode getReadTPMode(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &Triple, bool ForAS)