[llvm] r211651 - Simplify the handling of .cfi_endproc.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jun 24 17:14:00 PDT 2014
Author: rafael
Date: Tue Jun 24 19:13:59 2014
New Revision: 211651
URL: http://llvm.org/viewvc/llvm-project?rev=211651&view=rev
Log:
Simplify the handling of .cfi_endproc.
No functionality change.
Modified:
llvm/trunk/include/llvm/MC/MCStreamer.h
llvm/trunk/lib/LTO/LTOModule.cpp
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/lib/MC/MCNullStreamer.cpp
llvm/trunk/lib/MC/MCObjectStreamer.cpp
llvm/trunk/lib/MC/MCStreamer.cpp
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=211651&r1=211650&r2=211651&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Tue Jun 24 19:13:59 2014
@@ -201,9 +201,7 @@ protected:
const MCExpr *ForceExpAbs(const MCExpr *Expr);
- void RecordProcStart(MCDwarfFrameInfo &Frame);
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
- void RecordProcEnd(MCDwarfFrameInfo &Frame);
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame);
MCWin64EHUnwindInfo *getCurrentW64UnwindInfo() {
Modified: llvm/trunk/lib/LTO/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=211651&r1=211650&r2=211651&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOModule.cpp (original)
+++ llvm/trunk/lib/LTO/LTOModule.cpp Tue Jun 24 19:13:59 2014
@@ -710,9 +710,6 @@ namespace {
unsigned char Value) override { return false; }
void EmitFileDirective(StringRef Filename) override {}
void FinishImpl() override {}
- void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override {
- RecordProcEnd(Frame);
- }
};
} // end anonymous namespace
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=211651&r1=211650&r2=211651&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Tue Jun 24 19:13:59 2014
@@ -935,10 +935,7 @@ void MCAsmStreamer::EmitCFIStartProcImpl
}
void MCAsmStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
- // Put a dummy non-null value in Frame.End to mark that this frame has been
- // closed.
- Frame.End = (MCSymbol *) 1;
-
+ MCStreamer::EmitCFIEndProcImpl(Frame);
OS << "\t.cfi_endproc";
EmitEOL();
}
Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=211651&r1=211650&r2=211651&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCNullStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCNullStreamer.cpp Tue Jun 24 19:13:59 2014
@@ -81,10 +81,6 @@ namespace {
void EmitBundleUnlock() override {}
void FinishImpl() override {}
-
- void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override {
- RecordProcEnd(Frame);
- }
};
}
Modified: llvm/trunk/lib/MC/MCObjectStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectStreamer.cpp?rev=211651&r1=211650&r2=211651&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectStreamer.cpp Tue Jun 24 19:13:59 2014
@@ -136,11 +136,14 @@ void MCObjectStreamer::EmitValueImpl(con
}
void MCObjectStreamer::EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) {
- RecordProcStart(Frame);
+ // We need to create a local symbol to avoid relocations.
+ Frame.Begin = getContext().CreateTempSymbol();
+ EmitLabel(Frame.Begin);
}
void MCObjectStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
- RecordProcEnd(Frame);
+ Frame.End = getContext().CreateTempSymbol();
+ EmitLabel(Frame.End);
}
void MCObjectStreamer::EmitLabel(MCSymbol *Symbol) {
Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=211651&r1=211650&r2=211651&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Tue Jun 24 19:13:59 2014
@@ -264,12 +264,6 @@ void MCStreamer::EmitCFIStartProc(bool I
void MCStreamer::EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) {
}
-void MCStreamer::RecordProcStart(MCDwarfFrameInfo &Frame) {
- // We need to create a local symbol to avoid relocations.
- Frame.Begin = getContext().CreateTempSymbol();
- EmitLabel(Frame.Begin);
-}
-
void MCStreamer::EmitCFIEndProc() {
EnsureValidFrame();
MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
@@ -277,11 +271,9 @@ void MCStreamer::EmitCFIEndProc() {
}
void MCStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
-}
-
-void MCStreamer::RecordProcEnd(MCDwarfFrameInfo &Frame) {
- Frame.End = getContext().CreateTempSymbol();
- EmitLabel(Frame.End);
+ // Put a dummy non-null value in Frame.End to mark that this frame has been
+ // closed.
+ Frame.End = (MCSymbol *) 1;
}
MCSymbol *MCStreamer::EmitCFICommon() {
More information about the llvm-commits
mailing list