LLVM  8.0.1
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 "llvm/MC/MCSection.h"
14 #include "llvm/MC/SectionKind.h"
16 
17 namespace llvm {
18 
20 public:
22 
23  ~NVPTXTargetObjectFile() override;
24 
25  void Initialize(MCContext &ctx, const TargetMachine &TM) override {
27  }
28 
30  const Constant *C,
31  unsigned &Align) const override {
32  return ReadOnlySection;
33  }
34 
36  const TargetMachine &TM) const override {
37  return DataSection;
38  }
39 
41  const TargetMachine &TM) const override;
42 };
43 
44 } // end namespace llvm
45 
46 #endif // LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
uint64_t CallInst * C
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:39
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:111
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This class represents lattice values for constants.
Definition: AllocatorList.h:24
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
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:63
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 * 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.
Definition: TargetMachine.h:59
MCSection * ReadOnlySection
Section that is readonly and can contain arbitrary initialized data.