mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
for storing debug info by default, thus many (runtime) libraries has
this information included. These formats shouldn't be mixed in one binary
('stabs' & 'DWARF'), otherwise binutils tools will be confused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -52,7 +52,9 @@ std::string X86ATTAsmPrinter::getSectionForFunction(const Function &F) const {
|
||||
/// method to print assembly for each instruction.
|
||||
///
|
||||
bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) {
|
||||
if (Subtarget->isTargetDarwin() ||
|
||||
Subtarget->isTargetELF() ||
|
||||
Subtarget->isTargetCygwin()) {
|
||||
// Let PassManager know we need debug information and relay
|
||||
// the MachineDebugInfo address on to DwarfWriter.
|
||||
DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
|
||||
@@ -111,7 +113,9 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
F->getLinkage() == Function::WeakLinkage))
|
||||
O << "_llvm$workaround$fake$stub_" << CurrentFnName << ":\n";
|
||||
|
||||
if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) {
|
||||
if (Subtarget->isTargetDarwin() ||
|
||||
Subtarget->isTargetELF() ||
|
||||
Subtarget->isTargetCygwin()) {
|
||||
// Emit pre-function debug information.
|
||||
DW.BeginFunction(&MF);
|
||||
}
|
||||
@@ -141,7 +145,9 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
if (TAI->hasDotTypeDotSizeDirective())
|
||||
O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
|
||||
|
||||
if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) {
|
||||
if (Subtarget->isTargetDarwin() ||
|
||||
Subtarget->isTargetELF() ||
|
||||
Subtarget->isTargetCygwin()) {
|
||||
// Emit post-function debug information.
|
||||
DW.EndFunction();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user