From da11df0c22f5d0ba2e2be3ae4a7076c806233db8 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 9 Sep 2013 19:48:37 +0000 Subject: Call generateCompactUnwindEncodings() right before we need to output the frame information. There are more than one paths to where the frame information is emitted. Place the call to generateCompactUnwindEncodings() into the method which outputs the frame information, thus ensuring that the encoding is there for every path. This involved threading the MCAsmBackend object through to this method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190335 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCDwarf.h | 4 +++- include/llvm/MC/MCStreamer.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'include/llvm/MC') diff --git a/include/llvm/MC/MCDwarf.h b/include/llvm/MC/MCDwarf.h index c671dd9..7a06cc0 100644 --- a/include/llvm/MC/MCDwarf.h +++ b/include/llvm/MC/MCDwarf.h @@ -23,6 +23,7 @@ #include namespace llvm { +class MCAsmBackend; class MCContext; class MCSection; class MCStreamer; @@ -449,7 +450,8 @@ public: // // This emits the frame info section. // - static void Emit(MCStreamer &streamer, bool usingCFI, bool isEH); + static void Emit(MCStreamer &streamer, MCAsmBackend *MAB, + bool usingCFI, bool isEH); static void EmitAdvanceLoc(MCStreamer &Streamer, uint64_t AddrDelta); static void EncodeAdvanceLoc(MCContext &Context, uint64_t AddrDelta, raw_ostream &OS); diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index c849e59..cd297a4 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -104,7 +104,7 @@ protected: virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame); void RecordProcEnd(MCDwarfFrameInfo &Frame); virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame); - void EmitFrames(bool usingCFI); + void EmitFrames(MCAsmBackend *MAB, bool usingCFI); MCWin64EHUnwindInfo *getCurrentW64UnwindInfo() { return CurrentW64UnwindInfo; @@ -134,7 +134,7 @@ public: return *W64UnwindInfos[i]; } - void generateCompactUnwindEncodings(MCAsmBackend &MAB); + void generateCompactUnwindEncodings(MCAsmBackend *MAB); /// @name Assembly File Formatting. /// @{ -- cgit v1.1