LoongArchTargetInfo.cpp 1.0 KB

123456789101112131415161718192021222324252627282930
  1. //===-- LoongArchTargetInfo.cpp - LoongArch Target Implementation ---------===//
  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. #include "TargetInfo/LoongArchTargetInfo.h"
  9. #include "llvm/MC/TargetRegistry.h"
  10. using namespace llvm;
  11. Target &llvm::getTheLoongArch32Target() {
  12. static Target TheLoongArch32Target;
  13. return TheLoongArch32Target;
  14. }
  15. Target &llvm::getTheLoongArch64Target() {
  16. static Target TheLoongArch64Target;
  17. return TheLoongArch64Target;
  18. }
  19. extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLoongArchTargetInfo() {
  20. RegisterTarget<Triple::loongarch32, /*HasJIT=*/false> X(
  21. getTheLoongArch32Target(), "loongarch32", "32-bit LoongArch",
  22. "LoongArch");
  23. RegisterTarget<Triple::loongarch64, /*HasJIT=*/true> Y(
  24. getTheLoongArch64Target(), "loongarch64", "64-bit LoongArch",
  25. "LoongArch");
  26. }