LLVM  4.0.0
AMDGPUTargetObjectFile.cpp
Go to the documentation of this file.
1 //===-- AMDGPUHSATargetObjectFile.cpp - AMDGPU Object Files ---------------===//
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 #include "AMDGPUTargetObjectFile.h"
11 #include "AMDGPU.h"
12 #include "llvm/MC/MCContext.h"
13 #include "llvm/MC/MCSectionELF.h"
14 #include "llvm/Support/ELF.h"
15 #include "Utils/AMDGPUBaseInfo.h"
16 
17 using namespace llvm;
18 
19 //===----------------------------------------------------------------------===//
20 // Generic Object File
21 //===----------------------------------------------------------------------===//
22 
24  const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {
25  if (Kind.isReadOnly() && AMDGPU::isReadOnlySegment(GO) &&
27  return TextSection;
28 
30 }
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:40
MCSection * TextSection
Section directive for standard text.
const Triple & getTargetTriple() const
This file declares the AMDGPU-specific subclass of TargetLoweringObjectFile.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
bool isReadOnlySegment(const GlobalValue *GV)
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:23
bool shouldEmitConstantsToTextSection(const Triple &TT)
const unsigned Kind
Primary interface to the complete machine description for the target machine.
bool isReadOnly() const
Definition: SectionKind.h:123