xref: /freebsd/contrib/llvm-project/llvm/lib/Target/DirectX/DXILMetadata.h (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1 //===- DXILMetadata.h - DXIL Metadata helper objects ----------------------===//
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 This file contains helper objects for working with DXIL metadata.
10 ///
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_TARGET_DIRECTX_DXILMETADATA_H
14 #define LLVM_TARGET_DIRECTX_DXILMETADATA_H
15 
16 #include <stdint.h>
17 
18 namespace llvm {
19 class Module;
20 class NamedMDNode;
21 class VersionTuple;
22 namespace dxil {
23 
24 class ValidatorVersionMD {
25   NamedMDNode *Entry;
26 
27 public:
28   ValidatorVersionMD(Module &M);
29 
30   void update(VersionTuple ValidatorVer);
31 
32   bool isEmpty();
33 };
34 
35 void createShaderModelMD(Module &M);
36 void createEntryMD(Module &M, const uint64_t ShaderFlags);
37 
38 } // namespace dxil
39 } // namespace llvm
40 
41 #endif // LLVM_TARGET_DIRECTX_DXILMETADATA_H
42