File indexing completed on 2026-05-10 08:44:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef LLVM_MC_MCSECTIONGOFF_H
0016 #define LLVM_MC_MCSECTIONGOFF_H
0017
0018 #include "llvm/BinaryFormat/GOFF.h"
0019 #include "llvm/MC/MCSection.h"
0020 #include "llvm/Support/raw_ostream.h"
0021
0022 namespace llvm {
0023
0024 class MCExpr;
0025
0026 class MCSectionGOFF final : public MCSection {
0027 private:
0028 MCSection *Parent;
0029 uint32_t Subsection;
0030
0031 friend class MCContext;
0032 MCSectionGOFF(StringRef Name, SectionKind K, MCSection *P, uint32_t Sub)
0033 : MCSection(SV_GOFF, Name, K.isText(), false, nullptr),
0034 Parent(P), Subsection(Sub) {}
0035
0036 public:
0037 void printSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
0038 raw_ostream &OS,
0039 uint32_t ) const override {
0040 OS << "\t.section\t\"" << getName() << "\"\n";
0041 }
0042
0043 bool useCodeAlign() const override { return false; }
0044
0045 MCSection *getParent() const { return Parent; }
0046 uint32_t getSubsection() const { return Subsection; }
0047
0048 static bool classof(const MCSection *S) { return S->getVariant() == SV_GOFF; }
0049 };
0050 }
0051
0052 #endif