[llvm-commits] [llvm] r78505 - in /llvm/trunk/lib/Target/PIC16: PIC16Section.h PIC16TargetObjectFile.cpp PIC16TargetObjectFile.h
Chris Lattner
sabre at nondot.org
Sat Aug 8 14:37:01 PDT 2009
Author: lattner
Date: Sat Aug 8 16:37:01 2009
New Revision: 78505
URL: http://llvm.org/viewvc/llvm-project?rev=78505&view=rev
Log:
add new PIC16Section class, this time hopefully not breaking the build :)
Added:
llvm/trunk/lib/Target/PIC16/PIC16Section.h
Modified:
llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp
llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h
Added: llvm/trunk/lib/Target/PIC16/PIC16Section.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16Section.h?rev=78505&view=auto
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16Section.h (added)
+++ llvm/trunk/lib/Target/PIC16/PIC16Section.h Sat Aug 8 16:37:01 2009
@@ -0,0 +1,37 @@
+//===- 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"
+
+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);
+ }
+ };
+
+
+
+} // end namespace llvm
+
+#endif
Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp?rev=78505&r1=78504&r2=78505&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp Sat Aug 8 16:37:01 2009
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "PIC16TargetObjectFile.h"
+#include "PIC16Section.h"
#include "PIC16ISelLowering.h"
#include "PIC16TargetMachine.h"
#include "llvm/DerivedTypes.h"
@@ -24,7 +25,7 @@
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());
}
Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h?rev=78505&r1=78504&r2=78505&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h Sat Aug 8 16:37:01 2009
@@ -26,7 +26,7 @@
/// again and printing only those that match the current section.
/// Keeping values inside the sections make printing a section much easier.
///
- /// FIXME: Reimplement by inheriting from MCSection.
+ /// FIXME: MOVE ALL THIS STUFF TO MCSectionPIC16.
///
struct PIC16Section {
const MCSection *S_; // Connection to actual Section.
More information about the llvm-commits
mailing list