mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
MC: split Win64EHUnwindEmitter into a shared streamer
This changes Win64EHEmitter into a utility WinEH UnwindEmitter that can be shared across multiple architectures and a target specific bit which is overridden (Win64::UnwindEmitter). This enables sharing the section selection code across X86 and the intended use in ARM for emitting unwind information for Windows on ARM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,9 +20,8 @@
|
||||
#include <vector>
|
||||
|
||||
namespace llvm {
|
||||
class StringRef;
|
||||
class MCStreamer;
|
||||
class MCSymbol;
|
||||
class MCStreamer;
|
||||
class MCSymbol;
|
||||
|
||||
namespace Win64EH {
|
||||
struct Instruction {
|
||||
@@ -52,17 +51,13 @@ struct Instruction {
|
||||
return WinEH::Instruction(UOP_SetFPReg, L, Reg, Off);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class MCWin64EHUnwindEmitter {
|
||||
public:
|
||||
static StringRef GetSectionSuffix(const MCSymbol *func);
|
||||
//
|
||||
// This emits the unwind info sections (.pdata and .xdata in PE/COFF).
|
||||
//
|
||||
static void Emit(MCStreamer &streamer);
|
||||
static void EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info);
|
||||
};
|
||||
class UnwindEmitter : public WinEH::UnwindEmitter {
|
||||
public:
|
||||
void Emit(MCStreamer &Streamer) const override;
|
||||
void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI) const override;
|
||||
};
|
||||
}
|
||||
} // end namespace llvm
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user