mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
refactor section construction in TLOF to be through an explicit
initialize method, which can be called when an MCContext is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user