1 //===-- llvm/MC/MCSectionGOFF.h - GOFF Machine Code Sections ----*- 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 /// \file 10 /// This file declares the MCSectionGOFF class, which contains all of the 11 /// necessary machine code sections for the GOFF file format. 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #ifndef LLVM_MC_MCSECTIONGOFF_H 16 #define LLVM_MC_MCSECTIONGOFF_H 17 18 #include "llvm/MC/MCSection.h" 19 #include "llvm/Support/raw_ostream.h" 20 21 namespace llvm { 22 23 class MCExpr; 24 25 class MCSectionGOFF final : public MCSection { 26 private: 27 friend class MCContext; MCSectionGOFF(StringRef Name,SectionKind K)28 MCSectionGOFF(StringRef Name, SectionKind K) 29 : MCSection(SV_GOFF, Name, K, nullptr) {} 30 31 public: PrintSwitchToSection(const MCAsmInfo & MAI,const Triple & T,raw_ostream & OS,const MCExpr * Subsection)32 void PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T, 33 raw_ostream &OS, 34 const MCExpr *Subsection) const override { 35 OS << "\t.section\t\"" << getName() << "\"\n"; 36 } 37 UseCodeAlign()38 bool UseCodeAlign() const override { return false; } 39 isVirtualSection()40 bool isVirtualSection() const override { return false; } 41 classof(const MCSection * S)42 static bool classof(const MCSection *S) { return S->getVariant() == SV_GOFF; } 43 }; 44 } // end namespace llvm 45 46 #endif 47