LLVM  8.0.1
BPFTargetInfo.cpp
Go to the documentation of this file.
1 //===-- BPFTargetInfo.cpp - BPF Target Implementation ---------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "BPF.h"
12 using namespace llvm;
13 
14 namespace llvm {
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 } // namespace llvm
28 
29 extern "C" void LLVMInitializeBPFTargetInfo() {
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 }
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This class represents lattice values for constants.
Definition: AllocatorList.h:24
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()