PPC.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //===--- PPC.h - PPC-specific Tool Helpers ----------------------*- 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. #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_PPC_H
  9. #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_PPC_H
  10. #include "clang/Driver/Driver.h"
  11. #include "llvm/ADT/StringRef.h"
  12. #include "llvm/Option/Option.h"
  13. #include <string>
  14. #include <vector>
  15. namespace clang {
  16. namespace driver {
  17. namespace tools {
  18. namespace ppc {
  19. bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value);
  20. enum class FloatABI {
  21. Invalid,
  22. Soft,
  23. Hard,
  24. };
  25. enum class ReadGOTPtrMode {
  26. Bss,
  27. SecurePlt,
  28. };
  29. FloatABI getPPCFloatABI(const Driver &D, const llvm::opt::ArgList &Args);
  30. std::string getPPCTargetCPU(const llvm::opt::ArgList &Args);
  31. const char *getPPCAsmModeForCPU(StringRef Name);
  32. ReadGOTPtrMode getPPCReadGOTPtrMode(const Driver &D, const llvm::Triple &Triple,
  33. const llvm::opt::ArgList &Args);
  34. void getPPCTargetFeatures(const Driver &D, const llvm::Triple &Triple,
  35. const llvm::opt::ArgList &Args,
  36. std::vector<llvm::StringRef> &Features);
  37. } // end namespace ppc
  38. } // end namespace target
  39. } // end namespace driver
  40. } // end namespace clang
  41. #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ARCH_PPC_H