diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-31 17:42:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-31 17:42:42 +0000 |
commit | 51d5b43cda213e3cac83700e39e47657c55fd362 (patch) | |
tree | 461ddaf686fedc49ae6b1a21211f4aa0def27a0c /llvm/lib/Target/TargetLoweringObjectFile.cpp | |
parent | fe4e34707cae1e634b572441baad8ef7457fbf11 (diff) | |
download | bcm5719-llvm-51d5b43cda213e3cac83700e39e47657c55fd362.tar.gz bcm5719-llvm-51d5b43cda213e3cac83700e39e47657c55fd362.zip |
refactor section construction in TLOF to be through an explicit
initialize method, which can be called when an MCContext is available.
llvm-svn: 77687
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index a42911d92b9..caeac30ef8a 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -261,10 +261,8 @@ getOrCreateSection(const char *Name, bool isDirective, // ELF //===----------------------------------------------------------------------===// -TargetLoweringObjectFileELF::TargetLoweringObjectFileELF(bool atIsCommentChar, - bool HasCrazyBSS) - : AtIsCommentChar(atIsCommentChar) { - +void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx, + const TargetMachine &TM) { if (!HasCrazyBSS) BSSSection_ = getOrCreateSection("\t.bss", true, SectionKind::BSS); else @@ -480,8 +478,8 @@ getSectionForMergeableConstant(SectionKind Kind) const { // MachO //===----------------------------------------------------------------------===// -TargetLoweringObjectFileMachO:: -TargetLoweringObjectFileMachO(const TargetMachine &TM) { +void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx, + const TargetMachine &TM) { TextSection = getOrCreateSection("\t.text", true, SectionKind::Text); DataSection = getOrCreateSection("\t.data", true, SectionKind::DataRel); @@ -592,7 +590,8 @@ getSectionForMergeableConstant(SectionKind Kind) const { // COFF //===----------------------------------------------------------------------===// -TargetLoweringObjectFileCOFF::TargetLoweringObjectFileCOFF() { +void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx, + const TargetMachine &TM) { TextSection = getOrCreateSection("\t.text", true, SectionKind::Text); DataSection = getOrCreateSection("\t.data", true, SectionKind::DataRel); } |