diff options
author | Devang Patel <dpatel@apple.com> | 2009-06-19 21:54:26 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-06-19 21:54:26 +0000 |
commit | 14a55d952cf238fff42da53a75f39cf06dab184b (patch) | |
tree | 6cdae6080a19a3b234ff1e5d5442d18f16ce2dad /lib/Target/XCore | |
parent | 73a76736fbae602563e1c7dab3658c005caa2c09 (diff) | |
download | external_llvm-14a55d952cf238fff42da53a75f39cf06dab184b.zip external_llvm-14a55d952cf238fff42da53a75f39cf06dab184b.tar.gz external_llvm-14a55d952cf238fff42da53a75f39cf06dab184b.tar.bz2 |
Move up dwarf writer initialization in common AsmPrinter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/XCoreAsmPrinter.cpp | 6 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreTargetAsmInfo.cpp | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/XCore/XCoreAsmPrinter.cpp b/lib/Target/XCore/XCoreAsmPrinter.cpp index c9a6d8a..ed4c101 100644 --- a/lib/Target/XCore/XCoreAsmPrinter.cpp +++ b/lib/Target/XCore/XCoreAsmPrinter.cpp @@ -428,6 +428,7 @@ void XCoreAsmPrinter::printMachineInstruction(const MachineInstr *MI) { bool XCoreAsmPrinter::doInitialization(Module &M) { bool Result = AsmPrinter::doInitialization(M); + DW = getAnalysisIfAvailable<DwarfWriter>(); if (!FileDirective.empty()) { emitFileDirective(FileDirective); @@ -449,11 +450,6 @@ bool XCoreAsmPrinter::doInitialization(Module &M) { } } - // Emit initial debug information. - DW = getAnalysisIfAvailable<DwarfWriter>(); - assert(DW && "Dwarf Writer is not available"); - DW->BeginModule(&M, getAnalysisIfAvailable<MachineModuleInfo>(), - O, this, TAI); return Result; } diff --git a/lib/Target/XCore/XCoreTargetAsmInfo.cpp b/lib/Target/XCore/XCoreTargetAsmInfo.cpp index fe985d2..59ad624 100644 --- a/lib/Target/XCore/XCoreTargetAsmInfo.cpp +++ b/lib/Target/XCore/XCoreTargetAsmInfo.cpp @@ -24,6 +24,7 @@ using namespace llvm; XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM) : ELFTargetAsmInfo(TM), Subtarget(TM.getSubtargetImpl()) { + SupportsDebugInformation = true; TextSection = getUnnamedSection("\t.text", SectionFlags::Code); DataSection = getNamedSection("\t.dp.data", SectionFlags::Writeable | SectionFlags::Small); |