[llvm] r214664 - MC: virtualise EmitWindowsUnwindTables
Saleem Abdulrasool
compnerd at compnerd.org
Sun Aug 3 11:51:26 PDT 2014
Author: compnerd
Date: Sun Aug 3 13:51:26 2014
New Revision: 214664
URL: http://llvm.org/viewvc/llvm-project?rev=214664&view=rev
Log:
MC: virtualise EmitWindowsUnwindTables
This makes EmitWindowsUnwindTables a virtual function and lowers the
implementation of the function to the X86WinCOFFStreamer. This method is a
target specific operation. This enables making the behaviour target dependent
by isolating it entirely to the target specific streamer.
Modified:
llvm/trunk/include/llvm/MC/MCStreamer.h
llvm/trunk/lib/MC/MCStreamer.cpp
llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=214664&r1=214663&r2=214664&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Sun Aug 3 13:51:26 2014
@@ -208,7 +208,7 @@ protected:
return CurrentWinFrameInfo;
}
- void EmitWindowsUnwindTables();
+ virtual void EmitWindowsUnwindTables();
virtual void EmitRawTextImpl(StringRef String);
Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=214664&r1=214663&r2=214664&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Sun Aug 3 13:51:26 2014
@@ -601,10 +601,6 @@ void MCStreamer::EmitRawText(const Twine
}
void MCStreamer::EmitWindowsUnwindTables() {
- if (!getNumWinFrameInfos())
- return;
-
- MCWin64EHUnwindEmitter::Emit(*this);
}
void MCStreamer::Finish() {
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp?rev=214664&r1=214663&r2=214664&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp Sun Aug 3 13:51:26 2014
@@ -20,6 +20,7 @@ public:
: MCWinCOFFStreamer(C, AB, *CE, OS) { }
void EmitWinEHHandlerData() override;
+ void EmitWindowsUnwindTables() override;
void FinishImpl() override;
};
@@ -31,6 +32,12 @@ void X86WinCOFFStreamer::EmitWinEHHandle
MCWin64EHUnwindEmitter::EmitUnwindInfo(*this, getCurrentWinFrameInfo());
}
+void X86WinCOFFStreamer::EmitWindowsUnwindTables() {
+ if (!getNumWinFrameInfos())
+ return;
+ MCWin64EHUnwindEmitter::Emit(*this);
+}
+
void X86WinCOFFStreamer::FinishImpl() {
EmitFrames(nullptr);
EmitWindowsUnwindTables();
More information about the llvm-commits
mailing list