diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-02-17 01:04:54 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-02-17 01:04:54 +0000 |
commit | 86e6cb924b85e7a288a4d8bfde5d1a8fb9810c88 (patch) | |
tree | c3e72b8f2057840adab445095bd46766d9fdddc8 /lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | |
parent | 1236df4aaa571461301eaa40c56de559a5a4f2f0 (diff) | |
download | external_llvm-86e6cb924b85e7a288a4d8bfde5d1a8fb9810c88.zip external_llvm-86e6cb924b85e7a288a4d8bfde5d1a8fb9810c88.tar.gz external_llvm-86e6cb924b85e7a288a4d8bfde5d1a8fb9810c88.tar.bz2 |
--- Merging (from foreign repository) r64714 into '.':
U include/llvm/CodeGen/DebugLoc.h
U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
Enable debug location generation at -Os. This goes with the reapplication of the
r63639 patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 847355c..75a34a6 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -726,15 +726,20 @@ void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) { ++EmittedInsts; if (TAI->doesSupportDebugInformation()) { - static DebugLoc PrevDL = DebugLoc::getUnknownLoc(); - DebugLoc CurDL = MI->getDebugLoc(); + const Function *F = MF->getFunction(); - if (!CurDL.isInvalid() && !CurDL.isUnknown() && PrevDL != CurDL) { - DebugLocTuple DLT = MF->getDebugLocTuple(CurDL); - printLabel(DW->RecordSourceLine(DLT.Line, DLT.Col, DLT.Src)); - } + // FIXME: Support more than '-Os'. + if (F->hasFnAttr(Attribute::OptimizeForSize)) { + static DebugLoc PrevDL = DebugLoc::getUnknownLoc(); + DebugLoc CurDL = MI->getDebugLoc(); + + if (!CurDL.isUnknown() && PrevDL != CurDL) { + DebugLocTuple DLT = MF->getDebugLocTuple(CurDL); + printLabel(DW->RecordSourceLine(DLT.Line, DLT.Col, DLT.Src)); + } - PrevDL = CurDL; + PrevDL = CurDL; + } } // Call the autogenerated instruction printer routines. |