mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 08:46:23 +00:00
make PIC16 create its own custom MCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78501 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7c599d056a
commit
50e38121d1
35
lib/Target/PIC16/PIC16Section.h
Normal file
35
lib/Target/PIC16/PIC16Section.h
Normal file
@ -0,0 +1,35 @@
|
||||
//===- 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"
|
||||
|
||||
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);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
#endif
|
@ -8,6 +8,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "PIC16TargetObjectFile.h"
|
||||
#include "PIC16Section.h"
|
||||
#include "PIC16ISelLowering.h"
|
||||
#include "PIC16TargetMachine.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
@ -24,7 +25,7 @@ const MCSection *PIC16TargetObjectFile::
|
||||
getPIC16Section(const char *Name, bool isDirective, SectionKind Kind) const {
|
||||
if (MCSection *S = getContext().GetSection(Name))
|
||||
return S;
|
||||
return MCSection::Create(Name, isDirective, Kind, getContext());
|
||||
return MCSectionPIC16::Create(Name, isDirective, Kind, getContext());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user