LLVM  14.0.0git
MCSectionGOFF.h
Go to the documentation of this file.
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"
20 
21 namespace llvm {
22 
23 class MCExpr;
24 
25 class MCSectionGOFF final : public MCSection {
26 private:
27  friend class MCContext;
29  : MCSection(SV_GOFF, Name, K, nullptr) {}
30 
31 public:
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 
38  bool UseCodeAlign() const override { return false; }
39 
40  bool isVirtualSection() const override { return false; }
41 
42  static bool classof(const MCSection *S) { return S->getVariant() == SV_GOFF; }
43 };
44 } // end namespace llvm
45 
46 #endif
llvm::MCSection::Name
StringRef Name
Definition: MCSection.h:111
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::MCSectionGOFF::isVirtualSection
bool isVirtualSection() const override
Check whether this section is "virtual", that is has no actual object file contents.
Definition: MCSectionGOFF.h:40
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:72
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
llvm::MCSectionGOFF::PrintSwitchToSection
void PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, const MCExpr *Subsection) const override
Definition: MCSectionGOFF.h:32
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::MCSectionGOFF
Definition: MCSectionGOFF.h:25
llvm::MCSectionGOFF::classof
static bool classof(const MCSection *S)
Definition: MCSectionGOFF.h:42
MCSection.h
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::MCSection::SV_GOFF
@ SV_GOFF
Definition: MCSection.h:46
llvm::MCSection::getName
StringRef getName() const
Definition: MCSection.h:122
llvm::SectionKind
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:22
llvm::MCSectionGOFF::UseCodeAlign
bool UseCodeAlign() const override
Return true if a .align directive should use "optimized nops" to fill instead of 0s.
Definition: MCSectionGOFF.h:38
raw_ostream.h
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35