mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-10 06:24:58 +00:00
![Tom Stellard](/assets/img/avatar_default.png)
Reviewers: arsenm, grosbach, rafael Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D12424 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248619 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
//===-- AMDGPUHSATargetObjectFile.cpp - AMDGPU Object Files ---------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "AMDGPUHSATargetObjectFile.h"
|
|
#include "Utils/AMDGPUBaseInfo.h"
|
|
#include "llvm/MC/MCContext.h"
|
|
#include "llvm/MC/MCSectionELF.h"
|
|
#include "llvm/Support/ELF.h"
|
|
|
|
using namespace llvm;
|
|
|
|
void AMDGPUHSATargetObjectFile::Initialize(MCContext &Ctx,
|
|
const TargetMachine &TM){
|
|
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
|
|
InitializeELF(TM.Options.UseInitArray);
|
|
|
|
TextSection = AMDGPU::getHSATextSection(Ctx);
|
|
|
|
}
|
|
|
|
MCSection *AMDGPUHSATargetObjectFile::SelectSectionForGlobal(
|
|
const GlobalValue *GV, SectionKind Kind,
|
|
Mangler &Mang,
|
|
const TargetMachine &TM) const {
|
|
if (Kind.isText() && !GV->hasComdat())
|
|
return getTextSection();
|
|
|
|
return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang, TM);
|
|
}
|