Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
BPFTargetInfo.cpp
Go to the documentation of this file.
1//===-- BPFTargetInfo.cpp - BPF 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
12
13using namespace llvm;
14
16 static Target TheBPFleTarget;
17 return TheBPFleTarget;
18}
20 static Target TheBPFbeTarget;
21 return TheBPFbeTarget;
22}
24 static Target TheBPFTarget;
25 return TheBPFTarget;
26}
27
30 TargetRegistry::RegisterTarget(getTheBPFTarget(), "bpf", "BPF (host endian)",
31 "BPF", [](Triple::ArchType) { return false; },
32 true);
33 RegisterTarget<Triple::bpfel, /*HasJIT=*/true> X(
34 getTheBPFleTarget(), "bpfel", "BPF (little endian)", "BPF");
35 RegisterTarget<Triple::bpfeb, /*HasJIT=*/true> Y(getTheBPFbeTarget(), "bpfeb",
36 "BPF (big endian)", "BPF");
37}
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFTargetInfo()
#define LLVM_ABI
Definition Compiler.h:213
#define LLVM_EXTERNAL_VISIBILITY
Definition Compiler.h:132
static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")
Target - Wrapper for Target specific information.
This is an optimization pass for GlobalISel generic memory operations.
Target & getTheBPFleTarget()
Target & getTheBPFbeTarget()
Target & getTheBPFTarget()
RegisterTarget - Helper template for registering a target, for use in the target's initialization fun...
static LLVM_ABI void RegisterTarget(Target &T, const char *Name, const char *ShortDesc, const char *BackendName, Target::ArchMatchFnTy ArchMatchFn, bool HasJIT=false)
RegisterTarget - Register the given target.