summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp
blob: a16dbae867b29749c55c1546a7cac42cb38792c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//===-- BPFTargetInfo.cpp - BPF Target Implementation ---------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "BPF.h"
#include "llvm/Support/TargetRegistry.h"
using namespace llvm;

namespace llvm {
Target TheBPFleTarget;
Target TheBPFbeTarget;
Target TheBPFTarget;
}

extern "C" void LLVMInitializeBPFTargetInfo() {
  TargetRegistry::RegisterTarget(TheBPFTarget, "bpf",
                                 "BPF (host endian)",
                                 [](Triple::ArchType) { return false; }, true);
  RegisterTarget<Triple::bpfel, /*HasJIT=*/true> X(
      TheBPFleTarget, "bpfel", "BPF (little endian)");
  RegisterTarget<Triple::bpfeb, /*HasJIT=*/true> Y(
      TheBPFbeTarget, "bpfeb", "BPF (big endian)");
}
OpenPOWER on IntegriCloud