diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-31 18:48:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-31 18:48:30 +0000 |
commit | a87dea4f8c546ca748f1777a8d1cabcc06515d91 (patch) | |
tree | 96993fb5aee8978a97581a0f79f86c61b2e1005f /lib/Target/XCore/XCoreTargetObjectFile.cpp | |
parent | 5e5337a833c36b069723ff864c873a1ba4883b99 (diff) |
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
Diffstat (limited to 'lib/Target/XCore/XCoreTargetObjectFile.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreTargetObjectFile.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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<XCoreSubtarget>().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 |