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 | e8e5495474d67cd5151bd88e502be3f46ace7a85 (patch) | |
| tree | b7d7ba2474eb1c24a5ad9ac687609dd67912cee1 /lib/Target/ARM/ARMAsmPrinter.cpp | |
| parent | 2a98ccabb4efe9882cdddd4b659e4935fc646040 (diff) | |
Debug support for arm-linux.
Patch by Raul Herbster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmPrinter.cpp')
| -rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index ac392607b0..c35ef57c9c 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/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); |
