xref: /freebsd/contrib/llvm-project/llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.cpp (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1 //===- DirectXTargetInfo.cpp - DirectX Target Implementation ----*- C++ -*-===//
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 /// \file
10 /// This file contains DirectX target initializer.
11 ///
12 //===----------------------------------------------------------------------===//
13 
14 #include "llvm/MC/TargetRegistry.h"
15 #include "llvm/Support/Compiler.h"
16 #include "llvm/TargetParser/Triple.h"
17 
18 namespace llvm {
getTheDirectXTarget()19 Target &getTheDirectXTarget() {
20   static Target TheDirectXTarget;
21   return TheDirectXTarget;
22 }
23 } // namespace llvm
24 
25 using namespace llvm;
26 
LLVMInitializeDirectXTargetInfo()27 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTargetInfo() {
28   RegisterTarget<Triple::dxil, /*HasJIT=*/false> X(
29       getTheDirectXTarget(), "dxil", "DirectX Intermediate Language", "DXIL");
30 }
31