[lld/COFF] Demangle symbol name in discarded section relocation error message (#119726)
[llvm-project.git] / llvm / lib / Target / RISCV / TargetInfo / RISCVTargetInfo.cpp
blob0a675d6849122587754f9d3777fbdf4c04cdf9e2
1 //===-- RISCVTargetInfo.cpp - RISC-V 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 //===----------------------------------------------------------------------===//
9 #include "TargetInfo/RISCVTargetInfo.h"
10 #include "llvm/MC/TargetRegistry.h"
11 using namespace llvm;
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" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetInfo() {
24 RegisterTarget<Triple::riscv32, /*HasJIT=*/true> X(
25 getTheRISCV32Target(), "riscv32", "32-bit RISC-V", "RISCV");
26 RegisterTarget<Triple::riscv64, /*HasJIT=*/true> Y(
27 getTheRISCV64Target(), "riscv64", "64-bit RISC-V", "RISCV");