aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PIC16/PIC16Section.h
blob: 4c2ae05707c5c3fa872c0307c2611c4abf5a2b84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//===- PIC16Section.h - PIC16-specific section representation ---*- C++ -*-===//
//
//                     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 MCSection class.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_PIC16SECTION_H
#define LLVM_PIC16SECTION_H

#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCContext.h"
#include "llvm/Support/raw_ostream.h"

namespace llvm {

  class MCSectionPIC16 : public MCSection {
    MCSectionPIC16(const StringRef &Name, bool IsDirective, SectionKind K,
                 MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
  public:
    
    static MCSectionPIC16 *Create(const StringRef &Name, bool IsDirective, 
                                  SectionKind K, MCContext &Ctx) {
      return new (Ctx) MCSectionPIC16(Name, IsDirective, K, Ctx);
    }
    
    
    virtual void PrintSwitchToSection(const TargetAsmInfo &TAI,
                                      raw_ostream &OS) const {
      OS << getName() << '\n';
    }

  };

} // end namespace llvm

#endif