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