40 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINERWRITER_H10#define LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINERWRITER_H11 12#include "DXContainerObject.h"13 14namespace llvm {15namespace objcopy {16namespace dxbc {17 18using namespace object;19 20class DXContainerWriter {21public:22 explicit DXContainerWriter(const Object &Obj, raw_ostream &Out)23 : Obj(Obj), Out(Out) {}24 Error write();25 26private:27 const Object &Obj;28 raw_ostream &Out;29 30 SmallVector<uint32_t> Offsets;31 32 size_t finalize();33};34 35} // end namespace dxbc36} // end namespace objcopy37} // end namespace llvm38 39#endif // LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINERWRITER_H40