1 //===-- RISCVTargetInfo.cpp - RISCV Target Implementation -----------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/Support/TargetRegistry.h"
14 Target &getTheRISCV32Target() {
15 static Target TheRISCV32Target;
16 return TheRISCV32Target;
19 Target &getTheRISCV64Target() {
20 static Target TheRISCV64Target;
21 return TheRISCV64Target;
25 extern "C" void LLVMInitializeRISCVTargetInfo() {
26 RegisterTarget<Triple::riscv32> X(getTheRISCV32Target(), "riscv32",
28 RegisterTarget<Triple::riscv64> Y(getTheRISCV64Target(), "riscv64",
32 // FIXME: Temporary stub - this function must be defined for linking
33 // to succeed and will be called unconditionally by llc, so must be a no-op.
34 // Remove once this function is properly implemented.
35 extern "C" void LLVMInitializeRISCVTargetMC() {}