38 useImageRel32 = (
A->getDataLayout().getPointerSizeInBits() == 64);
51 if (
F.hasFnAttribute(
"safeseh"))
54 if (M->getModuleFlag(
"ehcontguard") && !EHContTargets.empty()) {
57 for (
const MCSymbol *S : EHContTargets) {
58 OS.emitCOFFSymbolIndex(S);
64 shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA =
false;
79 if (
F.hasPersonalityFn()) {
80 PerFn = dyn_cast<Function>(
F.getPersonalityFn()->stripPointerCasts());
84 bool forceEmitPersonality =
F.hasPersonalityFn() &&
86 F.needsUnwindTableEntry();
88 shouldEmitPersonality =
89 forceEmitPersonality || ((hasLandingPads || hasEHFunclets) &&
93 shouldEmitLSDA = shouldEmitPersonality &&
106 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
108 shouldEmitLSDA = hasEHFunclets;
109 shouldEmitPersonality =
false;
117 if (isAArch64 && CurrentFuncletEntry &&
118 (shouldEmitMoves || shouldEmitPersonality))
125 if (!shouldEmitPersonality && !shouldEmitMoves && !shouldEmitLSDA)
130 if (
F.hasPersonalityFn())
139 if (shouldEmitPersonality || shouldEmitLSDA) {
150 emitCSpecificHandlerTable(MF);
152 emitExceptHandlerTable(MF);
154 emitCXXFrameHandler3Table(MF);
156 emitCLRExceptionTable(MF);
187 FuncLinkageName +
"@4HA");
192 CurrentFuncletEntry = &
MBB;
216 if (shouldEmitMoves || shouldEmitPersonality) {
217 CurrentFuncletTextSection =
Asm->
OutStreamer->getCurrentSectionOnly();
221 if (shouldEmitPersonality) {
226 if (
F.hasPersonalityFn())
227 PerFn = dyn_cast<Function>(
F.getPersonalityFn()->stripPointerCasts());
242 if (isAArch64 && CurrentFuncletEntry &&
243 (shouldEmitMoves || shouldEmitPersonality)) {
250void WinException::endFuncletImpl() {
252 if (!CurrentFuncletEntry)
256 if (shouldEmitMoves || shouldEmitPersonality) {
259 if (
F.hasPersonalityFn())
271 Twine(
"$cppxdata$", FuncLinkageName));
280 emitCSpecificHandlerTable(MF);
281 }
else if (shouldEmitPersonality || shouldEmitLSDA) {
301 CurrentFuncletEntry =
nullptr;
324const MCExpr *WinException::getLabelPlusOne(
const MCSymbol *Label) {
337const MCExpr *WinException::getOffsetPlusOne(
const MCSymbol *OffsetOf,
344int WinException::getFrameIndexOffset(
int FrameIndex,
365 "Frame offsets with a scalable component are not supported");
372const int NullState = -1;
374struct InvokeStateChange {
396class InvokeStateChangeIterator {
402 : EHInfo(EHInfo), MFI(MFI), MFE(MFE),
MBBI(
MBBI), BaseState(BaseState) {
403 LastStateChange.PreviousEndLabel =
nullptr;
404 LastStateChange.NewStartLabel =
nullptr;
405 LastStateChange.NewState = BaseState;
416 auto BlockBegin = Begin->begin();
417 auto BlockEnd = std::prev(
End)->end();
419 InvokeStateChangeIterator(EHInfo, Begin,
End, BlockBegin, BaseState),
420 InvokeStateChangeIterator(EHInfo,
End,
End, BlockEnd, BaseState));
424 bool operator==(
const InvokeStateChangeIterator &O)
const {
425 assert(BaseState ==
O.BaseState);
436 return CurrentEndLabel ==
O.CurrentEndLabel;
439 bool operator!=(
const InvokeStateChangeIterator &O)
const {
442 InvokeStateChange &
operator*() {
return LastStateChange; }
443 InvokeStateChange *operator->() {
return &LastStateChange; }
444 InvokeStateChangeIterator &operator++() {
return scan(); }
447 InvokeStateChangeIterator &scan();
450 const MCSymbol *CurrentEndLabel =
nullptr;
454 InvokeStateChange LastStateChange;
455 bool VisitingInvoke =
false;
461InvokeStateChangeIterator &InvokeStateChangeIterator::scan() {
462 bool IsNewBlock =
false;
463 for (; MFI != MFE; ++MFI, IsNewBlock =
true) {
466 for (
auto MBBE = MFI->end();
MBBI != MBBE; ++
MBBI) {
468 if (!VisitingInvoke && LastStateChange.NewState != BaseState &&
473 LastStateChange.PreviousEndLabel = CurrentEndLabel;
474 LastStateChange.NewStartLabel =
nullptr;
475 LastStateChange.NewState = BaseState;
476 CurrentEndLabel =
nullptr;
486 if (Label == CurrentEndLabel) {
487 VisitingInvoke =
false;
494 auto &StateAndEnd = InvokeMapIter->second;
495 int NewState = StateAndEnd.first;
498 VisitingInvoke =
true;
499 if (NewState == LastStateChange.NewState) {
502 CurrentEndLabel = StateAndEnd.second;
506 LastStateChange.PreviousEndLabel = CurrentEndLabel;
507 LastStateChange.NewStartLabel =
Label;
508 LastStateChange.NewState = NewState;
510 CurrentEndLabel = StateAndEnd.second;
517 if (LastStateChange.NewState != BaseState) {
519 LastStateChange.PreviousEndLabel = CurrentEndLabel;
520 LastStateChange.NewStartLabel =
nullptr;
521 LastStateChange.NewState = BaseState;
523 assert(CurrentEndLabel !=
nullptr);
527 CurrentEndLabel =
nullptr;
559void WinException::emitCSpecificHandlerTable(
const MachineFunction *MF) {
564 bool VerboseAsm =
OS.isVerboseAsm();
567 OS.AddComment(Comment);
588 const MCExpr *LabelDiff = getOffset(TableEnd, TableBegin);
591 AddComment(
"Number of call sites");
592 OS.emitValue(EntryCount, 4);
594 OS.emitLabel(TableBegin);
603 const MCSymbol *LastStartLabel =
nullptr;
604 int LastEHState = -1;
609 while (Stop !=
End && !Stop->isEHFuncletEntry())
611 for (
const auto &StateChange :
612 InvokeStateChangeIterator::range(FuncInfo, MF->
begin(), Stop)) {
615 if (LastEHState != -1)
616 emitSEHActionsForRange(FuncInfo, LastStartLabel,
617 StateChange.PreviousEndLabel, LastEHState);
618 LastStartLabel = StateChange.NewStartLabel;
619 LastEHState = StateChange.NewState;
622 OS.emitLabel(TableEnd);
625void WinException::emitSEHActionsForRange(
const WinEHFuncInfo &FuncInfo,
627 const MCSymbol *EndLabel,
int State) {
630 bool VerboseAsm =
OS.isVerboseAsm();
633 OS.AddComment(Comment);
636 assert(BeginLabel && EndLabel);
637 while (State != -1) {
639 const MCExpr *FilterOrFinally;
640 const MCExpr *ExceptOrNull;
641 auto *Handler = cast<MachineBasicBlock *>(UME.
Handler);
648 FilterOrFinally = UME.
Filter ? create32bitRef(UME.
Filter)
650 ExceptOrNull = create32bitRef(Handler->getSymbol());
653 AddComment(
"LabelStart");
654 OS.emitValue(getLabel(BeginLabel), 4);
655 AddComment(
"LabelEnd");
656 OS.emitValue(getLabelPlusOne(EndLabel), 4);
657 AddComment(UME.
IsFinally ?
"FinallyFunclet" : UME.
Filter ?
"FilterFunction"
659 OS.emitValue(FilterOrFinally, 4);
660 AddComment(UME.
IsFinally ?
"Null" :
"ExceptionHandler");
661 OS.emitValue(ExceptOrNull, 4);
668void WinException::emitCXXFrameHandler3Table(
const MachineFunction *MF) {
677 if (shouldEmitPersonality) {
682 computeIP2StateTable(MF, FuncInfo, IPToStateTable);
687 int UnwindHelpOffset = 0;
698 MCSymbol *TryBlockMapXData =
nullptr;
702 Twine(
"$stateUnwindMap$", FuncLinkageName));
706 if (!IPToStateTable.
empty())
710 bool VerboseAsm =
OS.isVerboseAsm();
713 OS.AddComment(Comment);
731 OS.emitValueToAlignment(
Align(4));
732 OS.emitLabel(FuncInfoXData);
734 AddComment(
"MagicNumber");
735 OS.emitInt32(0x19930522);
737 AddComment(
"MaxState");
740 AddComment(
"UnwindMap");
741 OS.emitValue(create32bitRef(UnwindMapXData), 4);
743 AddComment(
"NumTryBlocks");
746 AddComment(
"TryBlockMap");
747 OS.emitValue(create32bitRef(TryBlockMapXData), 4);
749 AddComment(
"IPMapEntries");
750 OS.emitInt32(IPToStateTable.
size());
752 AddComment(
"IPToStateXData");
753 OS.emitValue(create32bitRef(IPToStateXData), 4);
757 AddComment(
"UnwindHelp");
758 OS.emitInt32(UnwindHelpOffset);
761 AddComment(
"ESTypeList");
764 AddComment(
"EHFlags");
775 if (UnwindMapXData) {
776 OS.emitLabel(UnwindMapXData);
779 Asm, dyn_cast_if_present<MachineBasicBlock *>(UME.
Cleanup));
780 AddComment(
"ToState");
783 AddComment(
"Action");
784 OS.emitValue(create32bitRef(CleanupSym), 4);
795 if (TryBlockMapXData) {
796 OS.emitLabel(TryBlockMapXData);
798 for (
size_t I = 0, E = FuncInfo.
TryBlockMap.size();
I != E; ++
I) {
801 MCSymbol *HandlerMapXData =
nullptr;
807 .
concat(FuncLinkageName));
815 "bad trymap interval");
817 AddComment(
"TryLow");
820 AddComment(
"TryHigh");
823 AddComment(
"CatchHigh");
826 AddComment(
"NumCatches");
829 AddComment(
"HandlerArray");
830 OS.emitValue(create32bitRef(HandlerMapXData), 4);
834 unsigned ParentFrameOffset = 0;
835 if (shouldEmitPersonality) {
840 for (
size_t I = 0, E = FuncInfo.
TryBlockMap.size();
I != E; ++
I) {
842 MCSymbol *HandlerMapXData = HandlerMaps[
I];
843 if (!HandlerMapXData)
852 OS.emitLabel(HandlerMapXData);
857 const MCExpr *FrameAllocOffsetRef =
nullptr;
860 assert(
Offset != 0 &&
"Illegal offset for catch object!");
867 Asm, dyn_cast_if_present<MachineBasicBlock *>(HT.
Handler));
869 AddComment(
"Adjectives");
875 AddComment(
"CatchObjOffset");
876 OS.emitValue(FrameAllocOffsetRef, 4);
878 AddComment(
"Handler");
879 OS.emitValue(create32bitRef(HandlerSym), 4);
881 if (shouldEmitPersonality) {
882 AddComment(
"ParentFrameOffset");
883 OS.emitInt32(ParentFrameOffset);
893 if (IPToStateXData) {
894 OS.emitLabel(IPToStateXData);
895 for (
auto &IPStatePair : IPToStateTable) {
897 OS.emitValue(IPStatePair.first, 4);
898 AddComment(
"ToState");
899 OS.emitInt32(IPStatePair.second);
904void WinException::computeIP2StateTable(
909 FuncletEnd = MF->
begin(),
911 FuncletStart !=
End; FuncletStart = FuncletEnd) {
913 while (++FuncletEnd !=
End) {
914 if (FuncletEnd->isEHFuncletEntry()) {
922 if (FuncletStart->isCleanupFuncletEntry())
927 if (FuncletStart == MF->
begin()) {
928 BaseState = NullState;
932 cast<FuncletPadInst>(FuncletStart->getBasicBlock()->getFirstNonPHI());
937 assert(StartLabel &&
"need local function start label");
938 IPToStateTable.push_back(
939 std::make_pair(create32bitRef(StartLabel), BaseState));
941 for (
const auto &StateChange : InvokeStateChangeIterator::range(
942 FuncInfo, FuncletStart, FuncletEnd, BaseState)) {
947 const MCSymbol *ChangeLabel = StateChange.NewStartLabel;
949 ChangeLabel = StateChange.PreviousEndLabel;
955 const MCExpr *LabelExpression = (isAArch64 || isThumb)
956 ? getLabel(ChangeLabel)
957 : getLabelPlusOne(ChangeLabel);
958 IPToStateTable.push_back(
959 std::make_pair(LabelExpression, StateChange.NewState));
965void WinException::emitEHRegistrationOffsetLabel(
const WinEHFuncInfo &FuncInfo,
998 bool VerboseAsm =
OS.isVerboseAsm();
1001 OS.AddComment(Comment);
1005 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
1009 OS.emitValueToAlignment(
Align(4));
1010 OS.emitLabel(LSDALabel);
1012 const auto *Per = cast<Function>(
F.getPersonalityFn()->stripPointerCasts());
1015 if (PerName ==
"_except_handler4") {
1038 int GSCookieOffset = -2;
1050 int EHCookieOffset = 9999;
1059 AddComment(
"GSCookieOffset");
1060 OS.emitInt32(GSCookieOffset);
1061 AddComment(
"GSCookieXOROffset");
1063 AddComment(
"EHCookieOffset");
1064 OS.emitInt32(EHCookieOffset);
1065 AddComment(
"EHCookieXOROffset");
1072 auto *Handler = cast<MachineBasicBlock *>(UME.
Handler);
1078 AddComment(
"ToState");
1079 OS.emitInt32(ToState);
1080 AddComment(UME.
IsFinally ?
"Null" :
"FilterFunction");
1081 OS.emitValue(create32bitRef(UME.
Filter), 4);
1082 AddComment(UME.
IsFinally ?
"FinallyFunclet" :
"ExceptionHandler");
1083 OS.emitValue(create32bitRef(ExceptOrFinally), 4);
1089 while (State != -1) {
1100 while (LeftRank < RightRank) {
1105 while (RightRank < LeftRank) {
1139 assert(NumStates > 0 &&
"Don't need exception table!");
1141 for (
int State = 0; State < NumStates; ++State) {
1143 cast<MachineBasicBlock *>(FuncInfo.
ClrEHUnwindMap[State].Handler);
1144 HandlerStates[HandlerBlock] = State;
1149 "ill-formed state numbering");
1152 HandlerStates[&MF->
front()] = NullState;
1156 OS.emitInt32(0xffffffff);
1158 OS.emitInt32(NumStates);
1177 std::unique_ptr<MCSymbol *[]> EndSymbolMap(
new MCSymbol *[NumStates]);
1182 FuncletEnd = MF->
begin(),
1184 FuncletStart !=
End; FuncletStart = FuncletEnd) {
1185 int FuncletState = HandlerStates[&*FuncletStart];
1188 while (++FuncletEnd !=
End) {
1189 if (FuncletEnd->isEHFuncletEntry()) {
1196 OS.emitValue(getOffset(EndSymbol, FuncBeginSym), 4);
1197 if (FuncletState != NullState) {
1199 EndSymbolMap[FuncletState] = EndSymbol;
1204 const MCSymbol *CurrentStartLabel =
nullptr;
1205 int CurrentState = NullState;
1207 for (
const auto &StateChange :
1208 InvokeStateChangeIterator::range(FuncInfo, FuncletStart, FuncletEnd)) {
1210 int StillPendingState =
1212 while (CurrentState != StillPendingState) {
1213 assert(CurrentState != NullState &&
1214 "Failed to find still-pending state!");
1216 Clauses.
push_back({CurrentStartLabel, StateChange.PreviousEndLabel,
1217 CurrentState, FuncletState});
1219 CurrentState = FuncInfo.
ClrEHUnwindMap[CurrentState].TryParentState;
1222 if (HandlerStack.
back().second == CurrentState)
1226 if (StateChange.NewState != CurrentState) {
1230 for (
int EnteredState = StateChange.NewState;
1231 EnteredState != CurrentState;
1234 int &MinEnclosingState = MinClauseMap[EnteredState];
1235 if (FuncletState < MinEnclosingState)
1236 MinEnclosingState = FuncletState;
1240 HandlerStack.
emplace_back(CurrentStartLabel, CurrentState);
1241 CurrentStartLabel = StateChange.NewStartLabel;
1242 CurrentState = StateChange.NewState;
1249 OS.emitInt32(Clauses.
size());
1250 for (ClrClause &
Clause : Clauses) {
1299 const MCExpr *ClauseBegin =
1300 getOffsetPlusOne(
Clause.StartLabel, FuncBeginSym);
1301 const MCExpr *ClauseEnd = getOffsetPlusOne(
Clause.EndLabel, FuncBeginSym);
1306 const MCExpr *HandlerBegin = getOffset(BeginSym, FuncBeginSym);
1308 const MCExpr *HandlerEnd = getOffset(EndSym, FuncBeginSym);
1311 switch (
Entry.HandlerType) {
1325 if (
Clause.EnclosingState != MinClauseMap[
Clause.State]) {
1331 OS.emitInt32(Flags);
1334 OS.emitValue(ClauseBegin, 4);
1335 OS.emitValue(ClauseEnd, 4);
1338 OS.emitValue(HandlerBegin, 4);
1339 OS.emitValue(HandlerEnd, 4);
1343 OS.emitInt32(
Entry.TypeToken);
MachineBasicBlock MachineBasicBlock::iterator MBBI
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file contains constants used for implementing Dwarf debug support.
Module.h This file contains the declarations for the Module class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file describes how to lower LLVM code to machine code.
static int getTryAncestor(const WinEHFuncInfo &FuncInfo, int Left, int Right)
static int getTryRank(const WinEHFuncInfo &FuncInfo, int State)
static MCSymbol * getMCSymbolForMBB(AsmPrinter *Asm, const MachineBasicBlock *MBB)
Retrieve the MCSymbol for a GlobalValue or MachineBasicBlock.
This class is intended to be used as a driving class for all asm writers.
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
MCSymbol * getSymbol(const GlobalValue *GV) const
TargetMachine & TM
Target machine description.
MCSymbol * getFunctionBegin() const
const MCAsmInfo * MAI
Target Asm Printer information.
MachineFunction * MF
The current machine function.
MCSymbol * CurrentFnSym
The symbol for the current function.
void emitAlignment(Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const
Emit an alignment directive to the specified power of two boundary.
MCContext & OutContext
This is the context for the output file that we are streaming.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
MCSymbol * getFunctionEnd() const
Emits exception handling directives.
AsmPrinter * Asm
Target of directive emission.
MCSymbol * emitExceptionTable()
Emit landing pads and actions.
MachineModuleInfo * MMI
Collected machine module information.
static bool callToNoUnwindFunction(const MachineInstr *MI)
Return ‘true’ if this is a call to a function marked ‘nounwind’.
static StringRef dropLLVMManglingEscape(StringRef Name)
If the given string begins with the GlobalValue name mangling escape character '\1',...
bool usesWindowsCFI() const
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * createDiv(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Context object for machine code objects.
const MCObjectFileInfo * getObjectFileInfo() const
MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
MCSymbol * getOrCreateParentFrameOffsetSymbol(const Twine &FuncName)
MCSymbol * getOrCreateLSDASymbol(const Twine &FuncName)
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
Base class for the full range of assembler expressions which are needed for parsing.
MCSection * getGEHContSection() const
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Streaming machine code generation interface.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
bool isEHFuncletEntry() const
Returns true if this is the entry block of an EH funclet.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
Align getAlignment() const
Return alignment of the basic block.
bool isCleanupFuncletEntry() const
Returns true if this is the entry block of a cleanup funclet.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
int getStackProtectorIndex() const
Return the index for the stack protector object.
bool hasStackProtectorIndex() const
const WinEHFuncInfo * getWinEHFuncInfo() const
getWinEHFuncInfo - Return information about how the current function uses Windows exception handling.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
MCContext & getContext() const
Align getAlignment() const
getAlignment - Return the alignment of the function.
Function & getFunction()
Return the LLVM function that this machine code represents.
const std::vector< LandingPadInfo > & getLandingPads() const
Return a reference to the landing pad info for the current function.
const std::vector< MCSymbol * > & getCatchretTargets() const
Returns a reference to a list of symbols that we have catchrets.
const MachineBasicBlock & front() const
bool hasEHFunclets() const
BasicBlockListType::const_iterator const_iterator
Representation of each machine instruction.
const Module * getModule() const
A Module instance is used to store all the information related to an LLVM module.
Metadata * getModuleFlag(StringRef Key) const
Return the corresponding value if Key appears in module flags, otherwise return null.
Wrapper class representing virtual and physical registers.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
reference emplace_back(ArgTypes &&... Args)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StackOffset holds a fixed and a scalable offset in bytes.
int64_t getFixed() const
Returns the fixed component of the stack.
static StackOffset getFixed(int64_t Fixed)
StringRef - Represent a constant reference to a string, i.e.
Information about stack frame layout on the target.
virtual StackOffset getNonLocalFrameIndexReference(const MachineFunction &MF, int FI) const
getNonLocalFrameIndexReference - This method returns the offset used to reference a frame index locat...
virtual StackOffset getFrameIndexReferencePreferSP(const MachineFunction &MF, int FI, Register &FrameReg, bool IgnoreSPUpdates) const
Same as getFrameIndexReference, except that the stack pointer (as opposed to the frame pointer) will ...
virtual unsigned getWinEHParentFrameOffset(const MachineFunction &MF) const
virtual StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const
getFrameIndexReference - This method should return the base register and offset used to reference a f...
Register getStackPointerRegisterToSaveRestore() const
If a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save...
unsigned getLSDAEncoding() const
virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
unsigned getPersonalityEncoding() const
const Triple & getTargetTriple() const
virtual const TargetFrameLowering * getFrameLowering() const
virtual const TargetLowering * getTargetLowering() const
bool isThumb() const
Tests whether the target is Thumb (little and big endian).
bool isAArch64() const
Tests whether the target is AArch64 (little and big endian).
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVM Value Representation.
StringRef getName() const
Return a constant reference to the value's name.
void endFunction(const MachineFunction *) override
Gather and emit post-function exception information.
void markFunctionEnd() override
void beginFunclet(const MachineBasicBlock &MBB, MCSymbol *Sym) override
Emit target-specific EH funclet machinery.
void endModule() override
Emit all exception information that should come after the content.
WinException(AsmPrinter *A)
void endFunclet() override
void beginFunction(const MachineFunction *MF) override
Gather pre-function exception information.
A range adaptor for a pair of iterators.
@ IMAGE_SYM_CLASS_STATIC
Static.
@ IMAGE_SYM_DTYPE_FUNCTION
A function that returns a base type.
@ SCT_COMPLEX_TYPE_SHIFT
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
This is an optimization pass for GlobalISel generic memory operations.
APInt operator*(APInt a, uint64_t RHS)
bool operator!=(uint64_t V1, const APInt &V2)
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
bool isNoOpWithoutInvoke(EHPersonality Pers)
Return true if this personality may be safely removed if there are no invoke instructions remaining i...
detail::concat_range< ValueT, RangeTs... > concat(RangeTs &&... Ranges)
Concatenated range across two or more ranges.
EHPersonality classifyEHPersonality(const Value *Pers)
See if the given exception handling personality function is one that we understand.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Similar to CxxUnwindMapEntry, but supports SEH filters.
int ToState
If unwinding continues through this handler, transition to the handler at this state.
MBBOrBasicBlock Handler
Holds the __except or __finally basic block.
const Function * Filter
Holds the filter expression function.
SmallVector< SEHUnwindMapEntry, 4 > SEHUnwindMap
SmallVector< ClrEHUnwindMapEntry, 4 > ClrEHUnwindMap
DenseMap< const FuncletPadInst *, int > FuncletBaseStateMap
SmallVector< WinEHTryBlockMapEntry, 4 > TryBlockMap
DenseMap< MCSymbol *, std::pair< int, MCSymbol * > > LabelToStateMap
SmallVector< CxxUnwindMapEntry, 4 > CxxUnwindMap
GlobalVariable * TypeDescriptor
union llvm::WinEHHandlerType::@252 CatchObj
The CatchObj starts out life as an LLVM alloca and is eventually turned frame index.
SmallVector< WinEHHandlerType, 1 > HandlerArray