diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 2062b61363a6..81934e172977 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2837,7 +2837,7 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU, void DwarfDebug::attachLowHighPC(DwarfCompileUnit *Unit, DIE *D, MCSymbol *Begin, MCSymbol *End) { Unit->addLabelAddress(D, dwarf::DW_AT_low_pc, Begin); - if (DwarfVersion < 4) + if (DwarfVersion < 4 || Triple(Asm->getTargetTriple()).isOSDarwin()) Unit->addLabelAddress(D, dwarf::DW_AT_high_pc, End); else Unit->addLabelDelta(D, dwarf::DW_AT_high_pc, End, Begin);