Platform.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- llvm/TextAPI/Platform.h - Platform -----------------------*- 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. // Defines the Platforms supported by Tapi and helpers.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_TEXTAPI_PLATFORM_H
  18. #define LLVM_TEXTAPI_PLATFORM_H
  19. #include "llvm/ADT/SmallSet.h"
  20. #include "llvm/BinaryFormat/MachO.h"
  21. namespace llvm {
  22. namespace MachO {
  23. using PlatformSet = SmallSet<PlatformType, 3>;
  24. PlatformType mapToPlatformType(PlatformType Platform, bool WantSim);
  25. PlatformType mapToPlatformType(const Triple &Target);
  26. PlatformSet mapToPlatformSet(ArrayRef<Triple> Targets);
  27. StringRef getPlatformName(PlatformType Platform);
  28. PlatformType getPlatformFromName(StringRef Name);
  29. std::string getOSAndEnvironmentName(PlatformType Platform,
  30. std::string Version = "");
  31. } // end namespace MachO.
  32. } // end namespace llvm.
  33. #endif // LLVM_TEXTAPI_PLATFORM_H
  34. #ifdef __GNUC__
  35. #pragma GCC diagnostic pop
  36. #endif