diff options
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index cd5141083e3..6e59a58b04d 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -460,9 +460,11 @@ static void EmitFrameMoves(MCStreamer &streamer, if (BaseLabel && Label) { MCSymbol *ThisSym = Label; if (ThisSym != BaseLabel) { + // FIXME: We should relax this instead of using a DW_CFA_advance_loc4 + // for every address change! streamer.EmitIntValue(dwarf::DW_CFA_advance_loc4, 1); const MCExpr *Length = MakeStartMinusEndExpr(streamer, *BaseLabel, - *ThisSym, 4); + *ThisSym, 0); streamer.EmitValue(Length, 4); BaseLabel = ThisSym; } @@ -672,6 +674,8 @@ static MCSymbol *EmitFDE(MCStreamer &streamer, streamer.EmitLabel(augmentationEnd); // Call Frame Instructions + EmitFrameMoves(streamer, frame.Moves, frame.Begin, true); + // Padding streamer.EmitValueToAlignment(4); |