2015-12-10 10:13:01 +08:00
|
|
|
//===-- AMDGPUTargetObjectFile.h - AMDGPU Object Info ----*- C++ -*-===//
|
2015-09-26 05:41:28 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-09-26 05:41:28 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
///
|
|
|
|
/// \file
|
2018-05-01 23:54:18 +08:00
|
|
|
/// This file declares the AMDGPU-specific subclass of
|
2015-12-10 10:13:01 +08:00
|
|
|
/// TargetLoweringObjectFile.
|
2015-09-26 05:41:28 +08:00
|
|
|
///
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-12-10 10:13:01 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETOBJECTFILE_H
|
|
|
|
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETOBJECTFILE_H
|
2015-09-26 05:41:28 +08:00
|
|
|
|
2017-03-27 22:04:01 +08:00
|
|
|
#include "AMDGPU.h"
|
2015-09-26 05:41:28 +08:00
|
|
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2015-12-10 10:13:01 +08:00
|
|
|
class AMDGPUTargetObjectFile : public TargetLoweringObjectFileELF {
|
|
|
|
public:
|
2016-10-25 03:23:39 +08:00
|
|
|
MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
|
2015-12-10 10:13:01 +08:00
|
|
|
const TargetMachine &TM) const override;
|
[AMDGPU] Set metadata access for explicit section
Summary:
This patch provides a means to set Metadata section kind
for a global variable, if its explicit section name is
prefixed with ".AMDGPU.metadata."
This could be useful to make the global variable go to
an ELF section without any section flags set.
Reviewers: dstuttard, tpr, kzhuravl, nhaehnle, t-tye
Reviewed By: dstuttard, kzhuravl
Subscribers: llvm-commits, arsenm, jvesely, wdng, yaxunl, t-tye
Differential Revision: https://reviews.llvm.org/D55267
llvm-svn: 348922
2018-12-12 19:20:04 +08:00
|
|
|
MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
|
|
|
|
const TargetMachine &TM) const override;
|
2015-12-10 10:13:01 +08:00
|
|
|
};
|
|
|
|
|
2015-09-26 05:41:28 +08:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|