mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
CodeGen: refactor DwarfException
DwarfException served as a base class for exception handling directive emission. However, this is also used by other exception models (e.g. Win64EH). Rename this class to EHStreamer and split it out of DwarfException.h. NFC. Use the opportunity to fix up some of the documentation comments to match current LLVM style. Also rename some functions to conform better with current LLVM coding style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210622 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -233,23 +233,23 @@ bool AsmPrinter::doInitialization(Module &M) {
|
||||
}
|
||||
}
|
||||
|
||||
DwarfException *DE = nullptr;
|
||||
EHStreamer *ES = nullptr;
|
||||
switch (MAI->getExceptionHandlingType()) {
|
||||
case ExceptionHandling::None:
|
||||
break;
|
||||
case ExceptionHandling::SjLj:
|
||||
case ExceptionHandling::DwarfCFI:
|
||||
DE = new DwarfCFIException(this);
|
||||
ES = new DwarfCFIException(this);
|
||||
break;
|
||||
case ExceptionHandling::ARM:
|
||||
DE = new ARMException(this);
|
||||
ES = new ARMException(this);
|
||||
break;
|
||||
case ExceptionHandling::Win64:
|
||||
DE = new Win64Exception(this);
|
||||
ES = new Win64Exception(this);
|
||||
break;
|
||||
}
|
||||
if (DE)
|
||||
Handlers.push_back(HandlerInfo(DE, EHTimerName, DWARFGroupName));
|
||||
if (ES)
|
||||
Handlers.push_back(HandlerInfo(ES, EHTimerName, DWARFGroupName));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user