mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +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:
@ -108,7 +108,7 @@ AsmPrinter::AsmPrinter(TargetMachine &tm, std::unique_ptr<MCStreamer> Streamer)
|
||||
MMI = nullptr;
|
||||
LI = nullptr;
|
||||
MF = nullptr;
|
||||
CurrentFnSym = CurrentFnSymForSize = nullptr;
|
||||
CurExceptionSym = CurrentFnSym = CurrentFnSymForSize = nullptr;
|
||||
CurrentFnBegin = nullptr;
|
||||
CurrentFnEnd = nullptr;
|
||||
GCMetadataPrinters = nullptr;
|
||||
@ -1129,12 +1129,19 @@ bool AsmPrinter::doFinalization(Module &M) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MCSymbol *AsmPrinter::getCurExceptionSym() {
|
||||
if (!CurExceptionSym)
|
||||
CurExceptionSym = createTempSymbol("exception", getFunctionNumber());
|
||||
return CurExceptionSym;
|
||||
}
|
||||
|
||||
void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
|
||||
this->MF = &MF;
|
||||
// Get the function symbol.
|
||||
CurrentFnSym = getSymbol(MF.getFunction());
|
||||
CurrentFnSymForSize = CurrentFnSym;
|
||||
CurrentFnBegin = nullptr;
|
||||
CurExceptionSym = nullptr;
|
||||
bool NeedsLocalForSize = MAI->needsLocalForSize();
|
||||
if (!MMI->getLandingPads().empty() || MMI->hasDebugInfo() ||
|
||||
NeedsLocalForSize) {
|
||||
|
Reference in New Issue
Block a user