Path: blob/main/contrib/llvm-project/llvm/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp
35294 views
//===-- BPFTargetInfo.cpp - BPF Target Implementation ---------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "TargetInfo/BPFTargetInfo.h"9#include "llvm/MC/TargetRegistry.h"1011using namespace llvm;1213Target &llvm::getTheBPFleTarget() {14static Target TheBPFleTarget;15return TheBPFleTarget;16}17Target &llvm::getTheBPFbeTarget() {18static Target TheBPFbeTarget;19return TheBPFbeTarget;20}21Target &llvm::getTheBPFTarget() {22static Target TheBPFTarget;23return TheBPFTarget;24}2526extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFTargetInfo() {27TargetRegistry::RegisterTarget(getTheBPFTarget(), "bpf", "BPF (host endian)",28"BPF", [](Triple::ArchType) { return false; },29true);30RegisterTarget<Triple::bpfel, /*HasJIT=*/true> X(31getTheBPFleTarget(), "bpfel", "BPF (little endian)", "BPF");32RegisterTarget<Triple::bpfeb, /*HasJIT=*/true> Y(getTheBPFbeTarget(), "bpfeb",33"BPF (big endian)", "BPF");34}353637