diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-20 05:58:47 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-20 05:58:47 +0000 |
commit | 76792992d66dc45c34fb28943c45a47a38d25c40 (patch) | |
tree | 061e869d07677a7eb47a1b76d37232c5286975f5 /llvm/lib/Target/TargetLoweringObjectFile.cpp | |
parent | 638b355a16adb909e0fbcfe3f382d9efd175df7f (diff) | |
download | bcm5719-llvm-76792992d66dc45c34fb28943c45a47a38d25c40.tar.gz bcm5719-llvm-76792992d66dc45c34fb28943c45a47a38d25c40.zip |
Add MCObjectFileInfo and sink the MCSections initialization code from
TargetLoweringObjectFileImpl down to MCObjectFileInfo.
TargetAsmInfo is done to one last method. It's *almost* gone!
llvm-svn: 135569
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index 20f87448dcd..2fb744f5bf4 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -35,34 +35,15 @@ using namespace llvm; // Generic Code //===----------------------------------------------------------------------===// -TargetLoweringObjectFile::TargetLoweringObjectFile() : - Ctx(0), - TextSection(0), - DataSection(0), - BSSSection(0), - ReadOnlySection(0), - StaticCtorSection(0), - StaticDtorSection(0), - LSDASection(0), - CompactUnwindSection(0), - DwarfAbbrevSection(0), - DwarfInfoSection(0), - DwarfLineSection(0), - DwarfFrameSection(0), - DwarfPubNamesSection(0), - DwarfPubTypesSection(0), - DwarfDebugInlineSection(0), - DwarfStrSection(0), - DwarfLocSection(0), - DwarfARangesSection(0), - DwarfRangesSection(0), - DwarfMacroInfoSection(0), - TLSExtraDataSection(0), - CommDirectiveSupportsAlignment(true), - SupportsWeakOmittedEHFrame(true), - IsFunctionEHFrameSymbolPrivate(true) { +/// Initialize - this method must be called before any actual lowering is +/// done. This specifies the current context for codegen, and gives the +/// lowering implementations a chance to set up their default sections. +void TargetLoweringObjectFile::Initialize(MCContext &ctx, + const TargetMachine &TM) { + Ctx = &ctx; + InitMCObjectFileInfo(TM.getTargetTriple(), TM.getRelocationModel(), *Ctx); } - + TargetLoweringObjectFile::~TargetLoweringObjectFile() { } |