| 1 | //===- DXContainerWriter.h --------------------------------------*- 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 | #ifndef LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINERWRITER_H |
| 10 | #define LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINERWRITER_H |
| 11 | |
| 12 | #include "DXContainerObject.h" |
| 13 | |
| 14 | namespace llvm { |
| 15 | namespace objcopy { |
| 16 | namespace dxbc { |
| 17 | |
| 18 | using namespace object; |
| 19 | |
| 20 | class DXContainerWriter { |
| 21 | public: |
| 22 | explicit DXContainerWriter(const Object &Obj, raw_ostream &Out) |
| 23 | : Obj(Obj), Out(Out) {} |
| 24 | Error write(); |
| 25 | |
| 26 | private: |
| 27 | const Object &Obj; |
| 28 | raw_ostream &Out; |
| 29 | |
| 30 | SmallVector<uint32_t> Offsets; |
| 31 | |
| 32 | size_t finalize(); |
| 33 | }; |
| 34 | |
| 35 | } // end namespace dxbc |
| 36 | } // end namespace objcopy |
| 37 | } // end namespace llvm |
| 38 | |
| 39 | #endif // LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINERWRITER_H |
| 40 | |