1
0
mirror of https://github.com/RPCS3/llvm.git synced 2024-12-30 16:34:03 +00:00

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool 2014-08-03 18:51:26 +00:00
parent 2aded1f5c7
commit 83eaeba2a8
3 changed files with 8 additions and 5 deletions
include/llvm/MC
lib
MC
Target/X86/MCTargetDesc

View File

@ -208,7 +208,7 @@ protected:
return CurrentWinFrameInfo;
}
void EmitWindowsUnwindTables();
virtual void EmitWindowsUnwindTables();
virtual void EmitRawTextImpl(StringRef String);

View File

@ -601,10 +601,6 @@ void MCStreamer::EmitRawText(const Twine &T) {
}
void MCStreamer::EmitWindowsUnwindTables() {
if (!getNumWinFrameInfos())
return;
MCWin64EHUnwindEmitter::Emit(*this);
}
void MCStreamer::Finish() {

View File

@ -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::EmitWinEHHandlerData() {
MCWin64EHUnwindEmitter::EmitUnwindInfo(*this, getCurrentWinFrameInfo());
}
void X86WinCOFFStreamer::EmitWindowsUnwindTables() {
if (!getNumWinFrameInfos())
return;
MCWin64EHUnwindEmitter::Emit(*this);
}
void X86WinCOFFStreamer::FinishImpl() {
EmitFrames(nullptr);
EmitWindowsUnwindTables();