LLVM 22.0.0git
Architecture.h
Go to the documentation of this file.
1//===- llvm/TextAPI/Architecture.h - Architecture ---------------*- 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// Defines the architecture enum and helper methods.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TEXTAPI_ARCHITECTURE_H
14#define LLVM_TEXTAPI_ARCHITECTURE_H
15
17#include <cstdint>
18#include <utility>
19
20namespace llvm {
21class raw_ostream;
22class StringRef;
23class Triple;
24
25namespace MachO {
26
27/// Defines the architecture slices that are supported by Text-based Stub files.
29#define ARCHINFO(Arch, Name, Type, SubType, NumBits) AK_##Arch,
30#include "llvm/TextAPI/Architecture.def"
31#undef ARCHINFO
32 AK_unknown, // this has to go last.
33};
34
35/// Convert a CPU Type and Subtype pair to an architecture slice.
37 uint32_t CPUSubType);
38
39/// Convert a name to an architecture slice.
41
42/// Convert an architecture slice to a string.
44
45/// Convert an architecture slice to a CPU Type and Subtype pair.
46LLVM_ABI std::pair<uint32_t, uint32_t>
48
49/// Convert a target to an architecture slice.
51
52/// Check if architecture is 64 bit.
54
56
57} // end namespace MachO.
58} // end namespace llvm.
59
60#endif // LLVM_TEXTAPI_ARCHITECTURE_H
#define LLVM_ABI
Definition: Compiler.h:213
std::string Name
raw_pwrite_stream & OS
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
LLVM_ABI Architecture getArchitectureFromName(StringRef Name)
Convert a name to an architecture slice.
LLVM_ABI StringRef getArchitectureName(Architecture Arch)
Convert an architecture slice to a string.
LLVM_ABI std::pair< uint32_t, uint32_t > getCPUTypeFromArchitecture(Architecture Arch)
Convert an architecture slice to a CPU Type and Subtype pair.
LLVM_ABI bool is64Bit(Architecture)
Check if architecture is 64 bit.
Architecture
Defines the architecture slices that are supported by Text-based Stub files.
Definition: Architecture.h:28
LLVM_ABI raw_ostream & operator<<(raw_ostream &OS, Architecture Arch)
LLVM_ABI Architecture mapToArchitecture(const llvm::Triple &Target)
Convert a target to an architecture slice.
LLVM_ABI Architecture getArchitectureFromCpuType(uint32_t CPUType, uint32_t CPUSubType)
Convert a CPU Type and Subtype pair to an architecture slice.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18