MCXCOFFStreamer.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- MCXCOFFObjectStreamer.h - MCStreamer XCOFF Object File Interface ---===//
  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_MCXCOFFSTREAMER_H
  14. #define LLVM_MC_MCXCOFFSTREAMER_H
  15. #include "llvm/MC/MCObjectStreamer.h"
  16. namespace llvm {
  17. class MCXCOFFStreamer : public MCObjectStreamer {
  18. public:
  19. MCXCOFFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
  20. std::unique_ptr<MCObjectWriter> OW,
  21. std::unique_ptr<MCCodeEmitter> Emitter);
  22. bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
  23. void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
  24. Align ByteAlignment) override;
  25. void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
  26. uint64_t Size = 0, Align ByteAlignment = Align(1),
  27. SMLoc Loc = SMLoc()) override;
  28. void emitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override;
  29. void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
  30. MCSymbol *CsectSym, Align Alignment) override;
  31. void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol,
  32. MCSymbolAttr Linkage,
  33. MCSymbolAttr Visibility) override;
  34. void emitXCOFFRefDirective(StringRef Name) override {
  35. report_fatal_error("emitXCOFFRefDirective is not implemented yet on object"
  36. "generation path");
  37. }
  38. void emitXCOFFRenameDirective(const MCSymbol *Name,
  39. StringRef Rename) override {
  40. report_fatal_error("emitXCOFFRenameDirective is not implemented yet on "
  41. "object generation path");
  42. }
  43. void emitXCOFFExceptDirective(const MCSymbol *Symbol, const MCSymbol *Trap,
  44. unsigned Lang, unsigned Reason,
  45. unsigned FunctionSize, bool hasDebug) override;
  46. };
  47. } // end namespace llvm
  48. #endif // LLVM_MC_MCXCOFFSTREAMER_H
  49. #ifdef __GNUC__
  50. #pragma GCC diagnostic pop
  51. #endif