diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-08 20:55:25 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-08 20:55:25 +0000 |
| commit | 4a4e4487fccdd30ddf9ffd01ba010a881fe5e4ee (patch) | |
| tree | bd98c248ffae02685a71aee006e49d395749e902 | |
| parent | 245fdfb9c36a0c872a0e7ecfea1355af450bee4c (diff) | |
| download | bcm5719-llvm-4a4e4487fccdd30ddf9ffd01ba010a881fe5e4ee.tar.gz bcm5719-llvm-4a4e4487fccdd30ddf9ffd01ba010a881fe5e4ee.zip | |
make PIC16 create its own custom MCSection.
llvm-svn: 78501
| -rw-r--r-- | llvm/lib/Target/PIC16/PIC16Section.h | 35 | ||||
| -rw-r--r-- | llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp | 3 |
2 files changed, 37 insertions, 1 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16Section.h b/llvm/lib/Target/PIC16/PIC16Section.h new file mode 100644 index 00000000000..c7bc9895e87 --- /dev/null +++ b/llvm/lib/Target/PIC16/PIC16Section.h @@ -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 diff --git a/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp b/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp index 3900929f466..a9668f9c07c 100644 --- a/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp +++ b/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp @@ -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()); } |

