Le64.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //===--- Le64.cpp - Implement Le64 target feature support -----------------===//
  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. // This file implements Le64 TargetInfo objects.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "Le64.h"
  13. #include "Targets.h"
  14. #include "clang/Basic/Builtins.h"
  15. #include "clang/Basic/MacroBuilder.h"
  16. #include "clang/Basic/TargetBuiltins.h"
  17. using namespace clang;
  18. using namespace clang::targets;
  19. const Builtin::Info Le64TargetInfo::BuiltinInfo[] = {
  20. #define BUILTIN(ID, TYPE, ATTRS) \
  21. {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
  22. #include "clang/Basic/BuiltinsLe64.def"
  23. };
  24. ArrayRef<Builtin::Info> Le64TargetInfo::getTargetBuiltins() const {
  25. return llvm::makeArrayRef(BuiltinInfo, clang::Le64::LastTSBuiltin -
  26. Builtin::FirstTSBuiltin);
  27. }
  28. void Le64TargetInfo::getTargetDefines(const LangOptions &Opts,
  29. MacroBuilder &Builder) const {
  30. DefineStd(Builder, "unix", Opts);
  31. defineCPUMacros(Builder, "le64", /*Tuning=*/false);
  32. Builder.defineMacro("__ELF__");
  33. }