NVPTXSection.h revision 249423
176259Sgreen//===- NVPTXSection.h - NVPTX-specific section representation -*- C++ -*-===// 276259Sgreen// 365668Skris// The LLVM Compiler Infrastructure 465668Skris// 565668Skris// This file is distributed under the University of Illinois Open Source 665668Skris// License. See LICENSE.TXT for details. 765668Skris// 865668Skris//===----------------------------------------------------------------------===// 965668Skris// 1065668Skris// This file declares the NVPTXSection class. 1165668Skris// 1265668Skris//===----------------------------------------------------------------------===// 1365668Skris 1465668Skris#ifndef LLVM_NVPTXSECTION_H 1565668Skris#define LLVM_NVPTXSECTION_H 1665668Skris 1765668Skris#include "llvm/IR/GlobalVariable.h" 1865668Skris#include "llvm/MC/MCSection.h" 1965668Skris#include <vector> 2065668Skris 2165668Skrisnamespace llvm { 2265668Skris/// NVPTXSection - Represents a section in PTX 2365668Skris/// PTX does not have sections. We create this class in order to use 2465668Skris/// the ASMPrint interface. 2565668Skris/// 2665668Skrisclass NVPTXSection : public MCSection { 2760573Skris 2860573Skrispublic: 2976259Sgreen NVPTXSection(SectionVariant V, SectionKind K) : MCSection(V, K) {} 3076259Sgreen ~NVPTXSection() {} 3176259Sgreen 3260573Skris /// Override this as NVPTX has its own way of printing switching 33 /// to a section. 34 virtual void PrintSwitchToSection(const MCAsmInfo &MAI, 35 raw_ostream &OS) const {} 36 37 /// Base address of PTX sections is zero. 38 virtual bool isBaseAddressKnownZero() const { return true; } 39 virtual bool UseCodeAlign() const { return false; } 40 virtual bool isVirtualSection() const { return false; } 41 virtual std::string getLabelBeginName() const { return ""; } 42 virtual std::string getLabelEndName() const { return ""; } 43}; 44 45} // end namespace llvm 46 47#endif 48