diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-05-03 20:28:35 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-05-03 20:28:35 +0000 |
commit | 83930198dd626c91e3ecb555b7a112e9f2159e49 (patch) | |
tree | 18b284d00f5933f2a19b6a13d734c6708e78e1a7 /llvm/lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | c332bbaae4ba776e3c460d699e57fd0aff3bfb76 (diff) | |
download | bcm5719-llvm-83930198dd626c91e3ecb555b7a112e9f2159e49.tar.gz bcm5719-llvm-83930198dd626c91e3ecb555b7a112e9f2159e49.zip |
Debug support for arm-linux.
Patch by Raul Herbster.
llvm-svn: 36690
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index ac392607b06..c35ef57c9cc 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -175,9 +175,7 @@ FunctionPass *llvm::createARMCodePrinterPass(std::ostream &o, bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { AFI = MF.getInfo<ARMFunctionInfo>(); - if (Subtarget->isTargetDarwin()) { - DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>()); - } + DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>()); SetupMachineFunction(MF); O << "\n"; @@ -231,10 +229,8 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { EmitAlignment(2, F); O << CurrentFnName << ":\n"; - if (Subtarget->isTargetDarwin()) { - // Emit pre-function debug information. - DW.BeginFunction(&MF); - } + // Emit pre-function debug information. + DW.BeginFunction(&MF); // Print out code for the function. for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); @@ -254,10 +250,8 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { if (TAI->hasDotTypeDotSizeDirective()) O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n"; - if (Subtarget->isTargetDarwin()) { - // Emit post-function debug information. - DW.EndFunction(); - } + // Emit post-function debug information. + DW.EndFunction(); return false; } @@ -769,10 +763,8 @@ void ARMAsmPrinter::printMachineInstruction(const MachineInstr *MI) { } bool ARMAsmPrinter::doInitialization(Module &M) { - if (Subtarget->isTargetDarwin()) { - // Emit initial debug information. - DW.BeginModule(&M); - } + // Emit initial debug information. + DW.BeginModule(&M); return AsmPrinter::doInitialization(M); } @@ -998,6 +990,9 @@ bool ARMAsmPrinter::doFinalization(Module &M) { // linker can safely perform dead code stripping. Since LLVM never // generates code that does this, it is always safe to set. O << "\t.subsections_via_symbols\n"; + } else { + // Emit final debug information for ELF. + DW.EndModule(); } AsmPrinter::doFinalization(M); |