Chris Lattner | f7427e5 | 2009-08-08 21:37:01 +0000 | [diff] [blame] | 1 | //===- PIC16Section.h - PIC16-specific section representation ---*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file declares the MCSection class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_PIC16SECTION_H |
| 15 | #define LLVM_PIC16SECTION_H |
| 16 | |
| 17 | #include "llvm/MC/MCSection.h" |
| 18 | #include "llvm/MC/MCContext.h" |
Chris Lattner | 892e182 | 2009-08-08 22:41:53 +0000 | [diff] [blame^] | 19 | #include "llvm/Support/raw_ostream.h" |
Chris Lattner | f7427e5 | 2009-08-08 21:37:01 +0000 | [diff] [blame] | 20 | |
| 21 | namespace llvm { |
| 22 | |
| 23 | class MCSectionPIC16 : public MCSection { |
| 24 | MCSectionPIC16(const StringRef &Name, bool IsDirective, SectionKind K, |
| 25 | MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {} |
| 26 | public: |
| 27 | |
| 28 | static MCSectionPIC16 *Create(const StringRef &Name, bool IsDirective, |
| 29 | SectionKind K, MCContext &Ctx) { |
| 30 | return new (Ctx) MCSectionPIC16(Name, IsDirective, K, Ctx); |
| 31 | } |
Chris Lattner | 892e182 | 2009-08-08 22:41:53 +0000 | [diff] [blame^] | 32 | |
| 33 | |
| 34 | virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, |
| 35 | raw_ostream &OS) const { |
| 36 | OS << getName() << '\n'; |
| 37 | } |
| 38 | |
Chris Lattner | f7427e5 | 2009-08-08 21:37:01 +0000 | [diff] [blame] | 39 | }; |
Chris Lattner | f7427e5 | 2009-08-08 21:37:01 +0000 | [diff] [blame] | 40 | |
| 41 | } // end namespace llvm |
| 42 | |
| 43 | #endif |