2017-01-14 15:37:50 +00:00
|
|
|
//===- NVPTXSection.h - NVPTX-specific section representation ---*- C++ -*-===//
|
2012-08-15 19:34:23 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the NVPTXSection class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-01-18 16:17:27 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_NVPTX_NVPTXSECTION_H
|
|
|
|
#define LLVM_LIB_TARGET_NVPTX_NVPTXSECTION_H
|
2012-08-15 19:34:23 +00:00
|
|
|
|
|
|
|
#include "llvm/MC/MCSection.h"
|
2017-01-14 15:37:50 +00:00
|
|
|
#include "llvm/MC/SectionKind.h"
|
2012-08-15 19:34:23 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2017-01-14 15:37:50 +00:00
|
|
|
|
2015-12-30 11:46:15 +00:00
|
|
|
/// Represents a section in PTX PTX does not have sections. We create this class
|
|
|
|
/// in order to use the ASMPrint interface.
|
2012-08-15 19:34:23 +00:00
|
|
|
///
|
2015-12-30 11:46:15 +00:00
|
|
|
class NVPTXSection final : public MCSection {
|
2013-12-22 00:04:03 +00:00
|
|
|
virtual void anchor();
|
2017-01-14 15:37:50 +00:00
|
|
|
|
2012-08-15 19:34:23 +00:00
|
|
|
public:
|
2015-05-27 18:44:32 +00:00
|
|
|
NVPTXSection(SectionVariant V, SectionKind K) : MCSection(V, K, nullptr) {}
|
2017-01-14 15:37:50 +00:00
|
|
|
~NVPTXSection() = default;
|
2012-08-15 19:34:23 +00:00
|
|
|
|
|
|
|
/// Override this as NVPTX has its own way of printing switching
|
|
|
|
/// to a section.
|
2014-11-24 09:08:18 +00:00
|
|
|
void PrintSwitchToSection(const MCAsmInfo &MAI,
|
|
|
|
raw_ostream &OS,
|
|
|
|
const MCExpr *Subsection) const override {}
|
2012-08-15 19:34:23 +00:00
|
|
|
|
|
|
|
/// Base address of PTX sections is zero.
|
2014-11-24 09:08:18 +00:00
|
|
|
bool UseCodeAlign() const override { return false; }
|
|
|
|
bool isVirtualSection() const override { return false; }
|
2012-08-15 19:34:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
2017-01-14 15:37:50 +00:00
|
|
|
#endif // LLVM_LIB_TARGET_NVPTX_NVPTXSECTION_H
|