WindowsMachineFlag.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- WindowsMachineFlag.h -------------------------------------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // Functions for implementing the /machine: flag.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_OBJECT_WINDOWSMACHINEFLAG_H
  18. #define LLVM_OBJECT_WINDOWSMACHINEFLAG_H
  19. namespace llvm {
  20. class StringRef;
  21. namespace COFF {
  22. enum MachineTypes : unsigned;
  23. }
  24. // Returns a user-readable string for ARMNT, ARM64, AMD64, I386.
  25. // Other MachineTypes values must not be passed in.
  26. StringRef machineToStr(COFF::MachineTypes MT);
  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. #endif
  32. #ifdef __GNUC__
  33. #pragma GCC diagnostic pop
  34. #endif