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:
parent
2aded1f5c7
commit
83eaeba2a8
@ -208,7 +208,7 @@ protected:
|
||||
return CurrentWinFrameInfo;
|
||||
}
|
||||
|
||||
void EmitWindowsUnwindTables();
|
||||
virtual void EmitWindowsUnwindTables();
|
||||
|
||||
virtual void EmitRawTextImpl(StringRef String);
|
||||
|
||||
|
@ -601,10 +601,6 @@ void MCStreamer::EmitRawText(const Twine &T) {
|
||||
}
|
||||
|
||||
void MCStreamer::EmitWindowsUnwindTables() {
|
||||
if (!getNumWinFrameInfos())
|
||||
return;
|
||||
|
||||
MCWin64EHUnwindEmitter::Emit(*this);
|
||||
}
|
||||
|
||||
void MCStreamer::Finish() {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user