1 //===-- RISCVTargetInfo.cpp - RISCV Target Implementation -----------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "TargetInfo/RISCVTargetInfo.h"
10 #include "llvm/Support/TargetRegistry.h"
13 Target
&llvm::getTheRISCV32Target() {
14 static Target TheRISCV32Target
;
15 return TheRISCV32Target
;
18 Target
&llvm::getTheRISCV64Target() {
19 static Target TheRISCV64Target
;
20 return TheRISCV64Target
;
23 extern "C" void LLVMInitializeRISCVTargetInfo() {
24 RegisterTarget
<Triple::riscv32
> X(getTheRISCV32Target(), "riscv32",
25 "32-bit RISC-V", "RISCV");
26 RegisterTarget
<Triple::riscv64
> Y(getTheRISCV64Target(), "riscv64",
27 "64-bit RISC-V", "RISCV");