LLVM 20.0.0git
WindowsMachineFlag.h
Go to the documentation of this file.
1//===- WindowsMachineFlag.h -------------------------------------*- 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// Functions for implementing the /machine: flag.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_OBJECT_WINDOWSMACHINEFLAG_H
14#define LLVM_OBJECT_WINDOWSMACHINEFLAG_H
15
18
19namespace llvm {
20
21class StringRef;
22namespace COFF {
24}
25
26// Returns a user-readable string for ARMNT, ARM64, AMD64, I386.
27// Other MachineTypes values must not be passed in.
29
30// Maps /machine: arguments to a MachineTypes value.
31// Only returns ARMNT, ARM64, AMD64, I386, or IMAGE_FILE_MACHINE_UNKNOWN.
33
34template <typename T> Triple::ArchType getMachineArchType(T machine) {
35 switch (machine) {
46 default:
48 }
49}
50
51} // namespace llvm
52
53#endif
@ UnknownArch
Definition: Triple.h:47
MachineTypes
Definition: COFF.h:92
@ IMAGE_FILE_MACHINE_ARM64
Definition: COFF.h:100
@ IMAGE_FILE_MACHINE_AMD64
Definition: COFF.h:97
@ IMAGE_FILE_MACHINE_ARM64EC
Definition: COFF.h:101
@ IMAGE_FILE_MACHINE_I386
Definition: COFF.h:104
@ IMAGE_FILE_MACHINE_ARM64X
Definition: COFF.h:102
@ IMAGE_FILE_MACHINE_ARMNT
Definition: COFF.h:99
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Triple::ArchType getMachineArchType(T machine)
COFF::MachineTypes getMachineType(StringRef S)
StringRef machineToStr(COFF::MachineTypes MT)