2012-05-05 04:18:50 +08:00
|
|
|
//===-- NVPTXTargetObjectFile.h - NVPTX Object Info -------------*- C++ -*-===//
|
|
|
|
//
|
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
|
2012-05-05 04:18:50 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
|
|
|
|
#define LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
|
2012-05-05 04:18:50 +08:00
|
|
|
|
2017-01-10 06:16:51 +08:00
|
|
|
#include "llvm/MC/MCSection.h"
|
|
|
|
#include "llvm/MC/SectionKind.h"
|
2018-03-24 07:58:19 +08:00
|
|
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
2012-05-05 04:18:50 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class NVPTXTargetObjectFile : public TargetLoweringObjectFile {
|
|
|
|
public:
|
2018-05-18 11:13:08 +08:00
|
|
|
NVPTXTargetObjectFile() : TargetLoweringObjectFile() {}
|
2013-06-24 21:19:41 +08:00
|
|
|
|
2017-01-10 06:16:51 +08:00
|
|
|
~NVPTXTargetObjectFile() override;
|
2012-05-05 04:18:50 +08:00
|
|
|
|
2014-03-02 17:09:27 +08:00
|
|
|
void Initialize(MCContext &ctx, const TargetMachine &TM) override {
|
2013-10-30 01:28:26 +08:00
|
|
|
TargetLoweringObjectFile::Initialize(ctx, TM);
|
2012-05-09 04:45:04 +08:00
|
|
|
}
|
2012-05-05 04:18:50 +08:00
|
|
|
|
2015-07-16 14:04:17 +08:00
|
|
|
MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
|
2016-02-21 09:40:04 +08:00
|
|
|
const Constant *C,
|
|
|
|
unsigned &Align) const override {
|
2012-05-05 04:18:50 +08:00
|
|
|
return ReadOnlySection;
|
2012-05-09 04:45:04 +08:00
|
|
|
}
|
2012-05-05 04:18:50 +08:00
|
|
|
|
2016-10-25 03:23:39 +08:00
|
|
|
MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
|
2015-05-22 03:20:38 +08:00
|
|
|
const TargetMachine &TM) const override {
|
2012-05-05 04:18:50 +08:00
|
|
|
return DataSection;
|
2012-05-09 04:45:04 +08:00
|
|
|
}
|
2012-05-05 04:18:50 +08:00
|
|
|
|
2016-10-25 03:23:39 +08:00
|
|
|
MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
|
2015-05-22 03:20:38 +08:00
|
|
|
const TargetMachine &TM) const override;
|
2012-05-05 04:18:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
2017-01-10 06:16:51 +08:00
|
|
|
#endif // LLVM_LIB_TARGET_NVPTX_NVPTXTARGETOBJECTFILE_H
|