LLVM  10.0.0svn
Architecture.h
Go to the documentation of this file.
1 //===- llvm/TextAPI/MachO/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_MACHO_ARCHITECTURE_H
14 #define LLVM_TEXTAPI_MACHO_ARCHITECTURE_H
15 
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/ADT/Triple.h"
19 
20 namespace llvm {
21 namespace MachO {
22 
23 /// Defines the architecture slices that are supported by Text-based Stub files.
24 enum Architecture : uint8_t {
25 #define ARCHINFO(Arch, Type, SubType) AK_##Arch,
26 #include "llvm/TextAPI/MachO/Architecture.def"
27 #undef ARCHINFO
28  AK_unknown, // this has to go last.
29 };
30 
31 /// Convert a CPU Type and Subtype pair to an architecture slice.
33 
34 /// Convert a name to an architecture slice.
36 
37 /// Convert an architecture slice to a string.
39 
40 /// Convert an architecture slice to a CPU Type and Subtype pair.
41 std::pair<uint32_t, uint32_t> getCPUTypeFromArchitecture(Architecture Arch);
42 
43 /// Convert a target to an architecture slice.
45 
47 
48 } // end namespace MachO.
49 } // end namespace llvm.
50 
51 #endif // LLVM_TEXTAPI_MACHO_ARCHITECTURE_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
raw_ostream & operator<<(raw_ostream &OS, Architecture Arch)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
Architecture
Defines the architecture slices that are supported by Text-based Stub files.
Definition: Architecture.h:24
std::pair< uint32_t, uint32_t > getCPUTypeFromArchitecture(Architecture Arch)
Convert an architecture slice to a CPU Type and Subtype pair.
Architecture getArchitectureFromName(StringRef Name)
Convert a name to an architecture slice.
Architecture getArchitectureFromCpuType(uint32_t CPUType, uint32_t CPUSubType)
Convert a CPU Type and Subtype pair to an architecture slice.
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
StringRef getArchitectureName(Architecture Arch)
Convert an architecture slice to a string.
Architecture mapToArchitecture(const llvm::Triple &Target)
Convert a target to an architecture slice.