mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Move the EH symbol to the asm printer and use it for the SJLJ case too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232475 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,22 +25,10 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
EHStreamer::EHStreamer(AsmPrinter *A)
|
||||
: CurExceptionSym(nullptr), Asm(A), MMI(Asm->MMI) {}
|
||||
EHStreamer::EHStreamer(AsmPrinter *A) : Asm(A), MMI(Asm->MMI) {}
|
||||
|
||||
EHStreamer::~EHStreamer() {}
|
||||
|
||||
MCSymbol *EHStreamer::getCurExceptionSym() {
|
||||
if (!CurExceptionSym)
|
||||
CurExceptionSym = Asm->OutContext.createTempSymbol(
|
||||
"exception" + Twine(Asm->getFunctionNumber()));
|
||||
return CurExceptionSym;
|
||||
}
|
||||
|
||||
void EHStreamer::beginFunction(const MachineFunction *MF) {
|
||||
CurExceptionSym = nullptr;
|
||||
}
|
||||
|
||||
/// How many leading type ids two landing pads have in common.
|
||||
unsigned EHStreamer::sharedTypeIDs(const LandingPadInfo *L,
|
||||
const LandingPadInfo *R) {
|
||||
@@ -448,11 +436,7 @@ void EHStreamer::emitExceptionTable() {
|
||||
Asm->OutContext.GetOrCreateSymbol(Twine("GCC_except_table")+
|
||||
Twine(Asm->getFunctionNumber()));
|
||||
Asm->OutStreamer.EmitLabel(GCCETSym);
|
||||
Asm->OutStreamer.EmitLabel(getCurExceptionSym());
|
||||
|
||||
if (IsSJLJ)
|
||||
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("_LSDA_",
|
||||
Asm->getFunctionNumber()));
|
||||
Asm->OutStreamer.EmitLabel(Asm->getCurExceptionSym());
|
||||
|
||||
// Emit the LSDA header.
|
||||
Asm->EmitEncodingByte(dwarf::DW_EH_PE_omit, "@LPStart");
|
||||
|
Reference in New Issue
Block a user