diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-01-09 00:17:29 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-01-09 00:17:29 +0000 |
commit | 1fe9737eb49ecb80fbb547f0e16e10a726cd53cf (patch) | |
tree | f9cf4ec79a43cdfb1a05d3c71aa47af7d7010bcd /lib/MC/MCAsmStreamer.cpp | |
parent | 39f227e4dd98d36ed852175825c3a74c05614bd6 (diff) |
Don't print an unused label before .cfi_endproc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index d70db2442e..13b2a39513 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -62,6 +62,7 @@ private: void EmitRegisterName(int64_t Register); virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame); + virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame); public: MCAsmStreamer(MCContext &Context, formatted_raw_ostream &os, @@ -210,7 +211,6 @@ public: StringRef FileName); virtual void EmitCFISections(bool EH, bool Debug); - virtual void EmitCFIEndProc(); virtual void EmitCFIDefCfa(int64_t Register, int64_t Offset); virtual void EmitCFIDefCfaOffset(int64_t Offset); virtual void EmitCFIDefCfaRegister(int64_t Register); @@ -851,11 +851,15 @@ void MCAsmStreamer::EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) { EmitEOL(); } -void MCAsmStreamer::EmitCFIEndProc() { - MCStreamer::EmitCFIEndProc(); - - if (!UseCFI) +void MCAsmStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) { + if (!UseCFI) { + RecordProcEnd(Frame); return; + } + + // Put a dummy non-null value in Frame.End to mark that this frame has been + // closed. + Frame.End = (MCSymbol *) 1; OS << "\t.cfi_endproc"; EmitEOL(); |