xref: /freebsd/contrib/llvm-project/llvm/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp (revision 02e9120893770924227138ba49df1edb3896112a)
1 //===-- SparcTargetInfo.cpp - Sparc 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/SparcTargetInfo.h"
10 #include "llvm/MC/TargetRegistry.h"
11 using namespace llvm;
12 
13 Target &llvm::getTheSparcTarget() {
14   static Target TheSparcTarget;
15   return TheSparcTarget;
16 }
17 Target &llvm::getTheSparcV9Target() {
18   static Target TheSparcV9Target;
19   return TheSparcV9Target;
20 }
21 Target &llvm::getTheSparcelTarget() {
22   static Target TheSparcelTarget;
23   return TheSparcelTarget;
24 }
25 
26 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcTargetInfo() {
27   RegisterTarget<Triple::sparc, /*HasJIT=*/false> X(getTheSparcTarget(),
28                                                     "sparc", "Sparc", "Sparc");
29   RegisterTarget<Triple::sparcv9, /*HasJIT=*/false> Y(
30       getTheSparcV9Target(), "sparcv9", "Sparc V9", "Sparc");
31   RegisterTarget<Triple::sparcel, /*HasJIT=*/false> Z(
32       getTheSparcelTarget(), "sparcel", "Sparc LE", "Sparc");
33 }
34