LLVM  4.0.0
NVPTXTargetObjectFile.h
Go to the documentation of this file.
1 //===-- NVPTXTargetObjectFile.h - NVPTX Object Info -------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
11 #define LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
12 
13 #include "NVPTXSection.h"
14 #include "llvm/MC/MCSection.h"
15 #include "llvm/MC/SectionKind.h"
17 
18 namespace llvm {
19 
21 public:
23  TextSection = nullptr;
24  DataSection = nullptr;
25  BSSSection = nullptr;
26  ReadOnlySection = nullptr;
27 
28  StaticCtorSection = nullptr;
29  StaticDtorSection = nullptr;
30  LSDASection = nullptr;
31  EHFrameSection = nullptr;
32  DwarfAbbrevSection = nullptr;
33  DwarfInfoSection = nullptr;
34  DwarfLineSection = nullptr;
35  DwarfFrameSection = nullptr;
36  DwarfPubTypesSection = nullptr;
37  DwarfDebugInlineSection = nullptr;
38  DwarfStrSection = nullptr;
39  DwarfLocSection = nullptr;
40  DwarfARangesSection = nullptr;
41  DwarfRangesSection = nullptr;
42  DwarfMacinfoSection = nullptr;
43  }
44 
45  ~NVPTXTargetObjectFile() override;
46 
47  void Initialize(MCContext &ctx, const TargetMachine &TM) override {
58  LSDASection =
84  }
85 
87  const Constant *C,
88  unsigned &Align) const override {
89  return ReadOnlySection;
90  }
91 
93  const TargetMachine &TM) const override {
94  return DataSection;
95  }
96 
98  const TargetMachine &TM) const override;
99 };
100 
101 } // end namespace llvm
102 
103 #endif // LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:40
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:102
static SectionKind getData()
Definition: SectionKind.h:202
MCSection * DwarfPubTypesSection
MCSection * TextSection
Section directive for standard text.
MCSection * StaticCtorSection
This section contains the static constructor pointer list.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
static SectionKind getBSS()
Definition: SectionKind.h:198
virtual void Initialize(MCContext &ctx, const TargetMachine &TM)
This method must be called before any actual lowering is done.
Context object for machine code objects.
Definition: MCContext.h:51
const MCSection * DwarfDebugInlineSection
MCSection * StaticDtorSection
This section contains the static destructor pointer list.
MCSection * DataSection
Section directive for standard data.
MCSection * getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Targets should implement this method to assign a section to globals with an explicit section specfied...
This is an important base class in LLVM.
Definition: Constant.h:42
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:23
void Initialize(MCContext &ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
MCSection * DwarfAbbrevSection
MCSection * EHFrameSection
EH frame section.
MCSection * DwarfRangesSection
static SectionKind getMetadata()
Definition: SectionKind.h:179
MCSection * DwarfARangesSection
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
MCSection * LSDASection
If exception handling is supported by the target, this is the section the Language Specific Data Area...
Represents a section in PTX PTX does not have sections.
Definition: NVPTXSection.h:25
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const override
Given a constant with the SectionKind, return a section that it should be placed in.
const unsigned Kind
Primary interface to the complete machine description for the target machine.
MCSection * BSSSection
Section that is default initialized to zero.
MCSection * ReadOnlySection
Section that is readonly and can contain arbitrary initialized data.
MCSection * DwarfMacinfoSection
static SectionKind getReadOnly()
Definition: SectionKind.h:182
static SectionKind getText()
Definition: SectionKind.h:180