MCDXContainerWriter.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- llvm/MC/MCDXContainerWriter.h - DXContainer Writer -*- C++ -------*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_MC_MCDXCONTAINERWRITER_H
  14. #define LLVM_MC_MCDXCONTAINERWRITER_H
  15. #include "llvm/ADT/Triple.h"
  16. #include "llvm/MC/MCObjectWriter.h"
  17. namespace llvm {
  18. class raw_pwrite_stream;
  19. class MCDXContainerTargetWriter : public MCObjectTargetWriter {
  20. protected:
  21. MCDXContainerTargetWriter() {}
  22. public:
  23. virtual ~MCDXContainerTargetWriter();
  24. Triple::ObjectFormatType getFormat() const override {
  25. return Triple::DXContainer;
  26. }
  27. static bool classof(const MCObjectTargetWriter *W) {
  28. return W->getFormat() == Triple::DXContainer;
  29. }
  30. };
  31. /// Construct a new DXContainer writer instance.
  32. ///
  33. /// \param MOTW - The target specific DXContainer writer subclass.
  34. /// \param OS - The stream to write to.
  35. /// \returns The constructed object writer.
  36. std::unique_ptr<MCObjectWriter>
  37. createDXContainerObjectWriter(std::unique_ptr<MCDXContainerTargetWriter> MOTW,
  38. raw_pwrite_stream &OS);
  39. } // end namespace llvm
  40. #endif // LLVM_MC_MCDXCONTAINERWRITER_H
  41. #ifdef __GNUC__
  42. #pragma GCC diagnostic pop
  43. #endif