From a87dea4f8c546ca748f1777a8d1cabcc06515d91 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 31 Jul 2009 18:48:30 +0000 Subject: switch off of 'Section' onto MCSection. We're not properly using MCSection subclasses yet, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/XCore/XCoreTargetObjectFile.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/Target/XCore/XCoreTargetObjectFile.cpp') diff --git a/lib/Target/XCore/XCoreTargetObjectFile.cpp b/lib/Target/XCore/XCoreTargetObjectFile.cpp index 964ec82d57..c28a33589d 100644 --- a/lib/Target/XCore/XCoreTargetObjectFile.cpp +++ b/lib/Target/XCore/XCoreTargetObjectFile.cpp @@ -8,10 +8,14 @@ //===----------------------------------------------------------------------===// #include "XCoreTargetObjectFile.h" +#include "XCoreSubtarget.h" +#include "llvm/Target/TargetMachine.h" using namespace llvm; -XCoreTargetObjectFile::XCoreTargetObjectFile(bool isXS1A) { +void XCoreTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){ + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + TextSection = getOrCreateSection("\t.text", true, SectionKind::Text); DataSection = getOrCreateSection("\t.dp.data", false, SectionKind::DataRel); BSSSection_ = getOrCreateSection("\t.dp.bss", false, SectionKind::BSS); @@ -22,11 +26,11 @@ XCoreTargetObjectFile::XCoreTargetObjectFile(bool isXS1A) { TLSDataSection = DataSection; TLSBSSSection = BSSSection_; - if (isXS1A) + if (TM.getSubtarget().isXS1A()) // FIXME: Why is this writable ("datarel")??? ReadOnlySection = getOrCreateSection("\t.dp.rodata", false, SectionKind::DataRel); else ReadOnlySection = getOrCreateSection("\t.cp.rodata", false, SectionKind::ReadOnly); -} +} \ No newline at end of file -- cgit v1.2.3-18-g5258