diff options
Diffstat (limited to 'lib/Target/BPF/TargetInfo')
| -rw-r--r-- | lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp | 18 | ||||
| -rw-r--r-- | lib/Target/BPF/TargetInfo/BPFTargetInfo.h | 22 |
2 files changed, 30 insertions, 10 deletions
diff --git a/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp b/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp index 1f7b8a04d589..5dfa915034ba 100644 --- a/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp +++ b/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp @@ -1,30 +1,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. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#include "BPF.h" +#include "TargetInfo/BPFTargetInfo.h" #include "llvm/Support/TargetRegistry.h" + using namespace llvm; -namespace llvm { -Target &getTheBPFleTarget() { +Target &llvm::getTheBPFleTarget() { static Target TheBPFleTarget; return TheBPFleTarget; } -Target &getTheBPFbeTarget() { +Target &llvm::getTheBPFbeTarget() { static Target TheBPFbeTarget; return TheBPFbeTarget; } -Target &getTheBPFTarget() { +Target &llvm::getTheBPFTarget() { static Target TheBPFTarget; return TheBPFTarget; } -} // namespace llvm extern "C" void LLVMInitializeBPFTargetInfo() { TargetRegistry::RegisterTarget(getTheBPFTarget(), "bpf", "BPF (host endian)", diff --git a/lib/Target/BPF/TargetInfo/BPFTargetInfo.h b/lib/Target/BPF/TargetInfo/BPFTargetInfo.h new file mode 100644 index 000000000000..150526c1a9db --- /dev/null +++ b/lib/Target/BPF/TargetInfo/BPFTargetInfo.h @@ -0,0 +1,22 @@ +//===-- BPFTargetInfo.h - BPF Target Implementation -------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_TARGET_BPF_TARGETINFO_BPFTARGETINFO_H +#define LLVM_LIB_TARGET_BPF_TARGETINFO_BPFTARGETINFO_H + +namespace llvm { + +class Target; + +Target &getTheBPFleTarget(); +Target &getTheBPFbeTarget(); +Target &getTheBPFTarget(); + +} // namespace llvm + +#endif // LLVM_LIB_TARGET_BPF_TARGETINFO_BPFTARGETINFO_H |
