LLVM  9.0.0svn
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 
9 #include "BPF.h"
11 using namespace llvm;
12 
13 namespace llvm {
15  static Target TheBPFleTarget;
16  return TheBPFleTarget;
17 }
19  static Target TheBPFbeTarget;
20  return TheBPFbeTarget;
21 }
23  static Target TheBPFTarget;
24  return TheBPFTarget;
25 }
26 } // namespace llvm
27 
28 extern "C" void LLVMInitializeBPFTargetInfo() {
29  TargetRegistry::RegisterTarget(getTheBPFTarget(), "bpf", "BPF (host endian)",
30  "BPF", [](Triple::ArchType) { return false; },
31  true);
32  RegisterTarget<Triple::bpfel, /*HasJIT=*/true> X(
33  getTheBPFleTarget(), "bpfel", "BPF (little endian)", "BPF");
34  RegisterTarget<Triple::bpfeb, /*HasJIT=*/true> Y(getTheBPFbeTarget(), "bpfeb",
35  "BPF (big endian)", "BPF");
36 }
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This class represents lattice values for constants.
Definition: AllocatorList.h:23
void LLVMInitializeBPFTargetInfo()
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
static void RegisterTarget(Target &T, const char *Name, const char *ShortDesc, const char *BackendName, Target::ArchMatchFnTy ArchMatchFn, bool HasJIT=false)
RegisterTarget - Register the given target.
Target - Wrapper for Target specific information.
Target & getTheBPFleTarget()
Target & getTheBPFbeTarget()
Target & getTheBPFTarget()