LLVM
20.0.0git
include
llvm
MC
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
"
20
#include "
llvm/Support/raw_ostream.h
"
21
22
namespace
llvm
{
23
24
class
MCExpr;
25
26
class
MCSectionGOFF
final :
public
MCSection
{
27
private
:
28
MCSection
*Parent;
29
uint32_t
Subsection;
30
31
friend
class
MCContext
;
32
MCSectionGOFF
(
StringRef
Name
,
SectionKind
K,
MCSection
*
P
,
uint32_t
Sub)
33
:
MCSection
(
SV_GOFF
,
Name
, K.
isText
(),
/*IsVirtual=*/
false
, nullptr),
34
Parent(
P
), Subsection(Sub) {}
35
36
public
:
37
void
printSwitchToSection
(
const
MCAsmInfo
&MAI,
const
Triple
&
T
,
38
raw_ostream
&
OS
,
39
uint32_t
/*Subsection*/
)
const override
{
40
OS
<<
"\t.section\t\""
<<
getName
() <<
"\"\n"
;
41
}
42
43
bool
useCodeAlign
()
const override
{
return
false
; }
44
45
MCSection
*
getParent
()
const
{
return
Parent; }
46
uint32_t
getSubsection
()
const
{
return
Subsection; }
47
48
static
bool
classof
(
const
MCSection
*S) {
return
S->
getVariant
() ==
SV_GOFF
; }
49
};
50
}
// end namespace llvm
51
52
#endif
GOFF.h
MCSection.h
P
#define P(N)
OS
raw_pwrite_stream & OS
Definition:
SampleProfWriter.cpp:53
T
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::MCContext
Context object for machine code objects.
Definition:
MCContext.h:83
llvm::MCSectionGOFF
Definition:
MCSectionGOFF.h:26
llvm::MCSectionGOFF::getParent
MCSection * getParent() const
Definition:
MCSectionGOFF.h:45
llvm::MCSectionGOFF::printSwitchToSection
void printSwitchToSection(const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, uint32_t) const override
Definition:
MCSectionGOFF.h:37
llvm::MCSectionGOFF::getSubsection
uint32_t getSubsection() const
Definition:
MCSectionGOFF.h:46
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:43
llvm::MCSectionGOFF::classof
static bool classof(const MCSection *S)
Definition:
MCSectionGOFF.h:48
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition:
MCSection.h:36
llvm::MCSection::getVariant
SectionVariant getVariant() const
Definition:
MCSection.h:133
llvm::MCSection::isText
bool isText() const
Definition:
MCSection.h:131
llvm::MCSection::Name
StringRef Name
Definition:
MCSection.h:119
llvm::MCSection::getName
StringRef getName() const
Definition:
MCSection.h:130
llvm::MCSection::SV_GOFF
@ SV_GOFF
Definition:
MCSection.h:45
llvm::SectionKind
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition:
SectionKind.h:22
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:50
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition:
Triple.h:44
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:
raw_ostream.h:52
uint32_t
false
Definition:
StackSlotColoring.cpp:194
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
raw_ostream.h
Generated on Sat Oct 12 2024 22:00:28 for LLVM by
1.9.6