WindowsMachineFlag.h revision d111c7844ec26448764ced627e153f406d730c5f
10ba2cbexc//===- WindowsMachineFlag.h -------------------------------------*- C++ -*-===//
2e2cf88aQuaker Fang//
30ba2cbexc// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40ba2cbexc// See https://llvm.org/LICENSE.txt for license information.
50ba2cbexc// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60ba2cbexc//
70ba2cbexc//===----------------------------------------------------------------------===//
80ba2cbexc//
90ba2cbexc// Functions for implementing the /machine: flag.
100ba2cbexc//
110ba2cbexc//===----------------------------------------------------------------------===//
120ba2cbexc
130ba2cbexc#ifndef LLVM_TOOLDRIVERS_MACHINEFLAG_MACHINEFLAG_H
140ba2cbexc#define LLVM_TOOLDRIVERS_MACHINEFLAG_MACHINEFLAG_H
150ba2cbexc
160ba2cbexcnamespace llvm {
170ba2cbexc
180ba2cbexcclass StringRef;
190ba2cbexcnamespace COFF {
200ba2cbexcenum MachineTypes : unsigned;
210ba2cbexc}
220ba2cbexc
230ba2cbexc// Returns a user-readable string for ARMNT, ARM64, AMD64, I386.
240ba2cbexc// Other MachineTypes values must not be passed in.
250ba2cbexcStringRef machineToStr(COFF::MachineTypes MT);
260ba2cbexc
270ba2cbexc// Maps /machine: arguments to a MachineTypes value.
280ba2cbexc// Only returns ARMNT, ARM64, AMD64, I386, or IMAGE_FILE_MACHINE_UNKNOWN.
290ba2cbexcCOFF::MachineTypes getMachineType(StringRef S);
300ba2cbexc
310ba2cbexc}
320ba2cbexc
330ba2cbexc#endif
340ba2cbexc