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 | |
16 | namespace llvm { |
17 | |
18 | class StringRef; |
19 | namespace COFF { |
20 | enum MachineTypes : unsigned; |
21 | } |
22 | |
23 | // Returns a user-readable string for ARMNT, ARM64, AMD64, I386. |
24 | // Other MachineTypes values must not be passed in. |
25 | StringRef machineToStr(COFF::MachineTypes MT); |
26 | |
27 | // Maps /machine: arguments to a MachineTypes value. |
28 | // Only returns ARMNT, ARM64, AMD64, I386, or IMAGE_FILE_MACHINE_UNKNOWN. |
29 | COFF::MachineTypes getMachineType(StringRef S); |
30 | |
31 | } |
32 | |
33 | #endif |
34 | |