MCSectionSPIRV.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- MCSectionSPIRV.h - SPIR-V Machine Code Sections ----------*- 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. //
  14. // This file declares the MCSectionSPIRV class.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_MC_MCSECTIONSPIRV_H
  18. #define LLVM_MC_MCSECTIONSPIRV_H
  19. #include "llvm/MC/MCSection.h"
  20. #include "llvm/MC/SectionKind.h"
  21. namespace llvm {
  22. class MCSymbol;
  23. class MCSectionSPIRV final : public MCSection {
  24. friend class MCContext;
  25. MCSectionSPIRV(SectionKind K, MCSymbol *Begin)
  26. : MCSection(SV_SPIRV, "", K, Begin) {}
  27. // TODO: Add StringRef Name to MCSectionSPIRV.
  28. public:
  29. ~MCSectionSPIRV() = default;
  30. void printSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
  31. raw_ostream &OS,
  32. const MCExpr *Subsection) const override {}
  33. bool useCodeAlign() const override { return false; }
  34. bool isVirtualSection() const override { return false; }
  35. };
  36. } // end namespace llvm
  37. #endif // LLVM_MC_MCSECTIONSPIRV_H
  38. #ifdef __GNUC__
  39. #pragma GCC diagnostic pop
  40. #endif