LLVM  16.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/BinaryFormat/GOFF.h"
19 #include "llvm/MC/MCSection.h"
21 
22 namespace llvm {
23 
24 class MCExpr;
25 
26 class MCSectionGOFF final : public MCSection {
27 private:
28  MCSection *Parent;
29  const MCExpr *SubsectionId;
30 
31  friend class MCContext;
33  : MCSection(SV_GOFF, Name, K, nullptr), Parent(P), SubsectionId(Sub) {}
34 
35 public:
36  void printSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
37  raw_ostream &OS,
38  const MCExpr *Subsection) const override {
39  OS << "\t.section\t\"" << getName() << "\"\n";
40  }
41 
42  bool useCodeAlign() const override { return false; }
43 
44  bool isVirtualSection() const override { return false; }
45 
46  MCSection *getParent() const { return Parent; }
47  const MCExpr *getSubsectionId() const { return SubsectionId; }
48 
49  static bool classof(const MCSection *S) { return S->getVariant() == SV_GOFF; }
50 };
51 } // end namespace llvm
52 
53 #endif
llvm::MCSection::Name
StringRef Name
Definition: MCSection.h:113
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MCSectionGOFF::isVirtualSection
bool isVirtualSection() const override
Check whether this section is "virtual", that is has no actual object file contents.
Definition: MCSectionGOFF.h:44
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:76
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
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
GOFF.h
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
T
#define T
Definition: Mips16ISelLowering.cpp:341
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:42
llvm::MCSectionGOFF::getParent
MCSection * getParent() const
Definition: MCSectionGOFF.h:46
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::printSwitchToSection
void printSwitchToSection(const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, const MCExpr *Subsection) const override
Definition: MCSectionGOFF.h:36
llvm::MCSectionGOFF
Definition: MCSectionGOFF.h:26
llvm::MCSectionGOFF::classof
static bool classof(const MCSection *S)
Definition: MCSectionGOFF.h:49
MCSection.h
llvm::MCSectionGOFF::getSubsectionId
const MCExpr * getSubsectionId() const
Definition: MCSectionGOFF.h:47
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
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:124
llvm::SectionKind
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:22
raw_ostream.h
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35