1 //===-- NVPTXTargetObjectFile.h - NVPTX Object Info -------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
12 #include "llvm/MC/MCSection.h"
13 #include "llvm/MC/SectionKind.h"
14 #include "llvm/Target/TargetLoweringObjectFile.h"
18 class NVPTXTargetObjectFile
: public TargetLoweringObjectFile
{
20 NVPTXTargetObjectFile() : TargetLoweringObjectFile() {}
22 ~NVPTXTargetObjectFile() override
;
24 void Initialize(MCContext
&ctx
, const TargetMachine
&TM
) override
{
25 TargetLoweringObjectFile::Initialize(ctx
, TM
);
28 MCSection
*getSectionForConstant(const DataLayout
&DL
, SectionKind Kind
,
30 unsigned &Align
) const override
{
31 return ReadOnlySection
;
34 MCSection
*getExplicitSectionGlobal(const GlobalObject
*GO
, SectionKind Kind
,
35 const TargetMachine
&TM
) const override
{
39 MCSection
*SelectSectionForGlobal(const GlobalObject
*GO
, SectionKind Kind
,
40 const TargetMachine
&TM
) const override
;
43 } // end namespace llvm
45 #endif // LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H