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);
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;
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;
693 FuncInfo.UnwindHelpFrameIdx != std::numeric_limits<int>::max())
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);
756 FuncInfo.UnwindHelpFrameIdx != std::numeric_limits<int>::max()) {
757 AddComment(
"UnwindHelp");
758 OS.emitInt32(UnwindHelpOffset);
761 AddComment(
"ESTypeList");
764 AddComment(
"EHFlags");
771 if (UnwindMapXData) {
772 OS.emitLabel(UnwindMapXData);
776 AddComment(
"ToState");
779 AddComment(
"Action");
780 OS.emitValue(create32bitRef(CleanupSym), 4);
791 if (TryBlockMapXData) {
792 OS.emitLabel(TryBlockMapXData);
794 for (
size_t I = 0,
E =
FuncInfo.TryBlockMap.size();
I !=
E; ++
I) {
797 MCSymbol *HandlerMapXData =
nullptr;
803 .
concat(FuncLinkageName));
811 "bad trymap interval");
813 AddComment(
"TryLow");
816 AddComment(
"TryHigh");
819 AddComment(
"CatchHigh");
822 AddComment(
"NumCatches");
825 AddComment(
"HandlerArray");
826 OS.emitValue(create32bitRef(HandlerMapXData), 4);
830 unsigned ParentFrameOffset = 0;
831 if (shouldEmitPersonality) {
836 for (
size_t I = 0,
E =
FuncInfo.TryBlockMap.size();
I !=
E; ++
I) {
838 MCSymbol *HandlerMapXData = HandlerMaps[
I];
839 if (!HandlerMapXData)
848 OS.emitLabel(HandlerMapXData);
853 const MCExpr *FrameAllocOffsetRef =
nullptr;
856 assert(
Offset != 0 &&
"Illegal offset for catch object!");
865 AddComment(
"Adjectives");
871 AddComment(
"CatchObjOffset");
872 OS.emitValue(FrameAllocOffsetRef, 4);
874 AddComment(
"Handler");
875 OS.emitValue(create32bitRef(HandlerSym), 4);
877 if (shouldEmitPersonality) {
878 AddComment(
"ParentFrameOffset");
879 OS.emitInt32(ParentFrameOffset);
889 if (IPToStateXData) {
890 OS.emitLabel(IPToStateXData);
891 for (
auto &IPStatePair : IPToStateTable) {
893 OS.emitValue(IPStatePair.first, 4);
894 AddComment(
"ToState");
895 OS.emitInt32(IPStatePair.second);
900void WinException::computeIP2StateTable(
905 FuncletEnd = MF->
begin(),
907 FuncletStart != End; FuncletStart = FuncletEnd) {
909 while (++FuncletEnd != End) {
910 if (FuncletEnd->isEHFuncletEntry()) {
918 if (FuncletStart->isCleanupFuncletEntry())
923 if (FuncletStart == MF->
begin()) {
924 BaseState = NullState;
928 cast<FuncletPadInst>(FuncletStart->getBasicBlock()->getFirstNonPHI());
930 BaseState =
FuncInfo.FuncletBaseStateMap.find(FuncletPad)->second;
933 assert(StartLabel &&
"need local function start label");
934 IPToStateTable.push_back(
935 std::make_pair(create32bitRef(StartLabel), BaseState));
937 for (
const auto &StateChange : InvokeStateChangeIterator::range(
938 FuncInfo, FuncletStart, FuncletEnd, BaseState)) {
943 const MCSymbol *ChangeLabel = StateChange.NewStartLabel;
945 ChangeLabel = StateChange.PreviousEndLabel;
951 const MCExpr *LabelExpression = (isAArch64 || isThumb)
952 ? getLabel(ChangeLabel)
953 : getLabelPlusOne(ChangeLabel);
954 IPToStateTable.push_back(
955 std::make_pair(LabelExpression, StateChange.NewState));
973 int FI =
FuncInfo.EHRegNodeFrameIndex;
994 bool VerboseAsm =
OS.isVerboseAsm();
997 OS.AddComment(Comment);
1001 emitEHRegistrationOffsetLabel(
FuncInfo, FLinkageName);
1005 OS.emitValueToAlignment(
Align(4));
1006 OS.emitLabel(LSDALabel);
1008 const auto *Per = cast<Function>(
F.getPersonalityFn()->stripPointerCasts());
1011 if (PerName ==
"_except_handler4") {
1034 int GSCookieOffset = -2;
1046 int EHCookieOffset = 9999;
1047 if (
FuncInfo.EHGuardFrameIndex != INT_MAX) {
1050 int EHGuardIdx =
FuncInfo.EHGuardFrameIndex;
1055 AddComment(
"GSCookieOffset");
1056 OS.emitInt32(GSCookieOffset);
1057 AddComment(
"GSCookieXOROffset");
1059 AddComment(
"EHCookieOffset");
1060 OS.emitInt32(EHCookieOffset);
1061 AddComment(
"EHCookieXOROffset");
1074 AddComment(
"ToState");
1075 OS.emitInt32(ToState);
1076 AddComment(UME.
IsFinally ?
"Null" :
"FilterFunction");
1077 OS.emitValue(create32bitRef(UME.
Filter), 4);
1078 AddComment(UME.
IsFinally ?
"FinallyFunclet" :
"ExceptionHandler");
1079 OS.emitValue(create32bitRef(ExceptOrFinally), 4);
1085 while (State != -1) {
1087 State =
FuncInfo.ClrEHUnwindMap[State].TryParentState;
1096 while (LeftRank < RightRank) {
1101 while (RightRank < LeftRank) {
1135 assert(NumStates > 0 &&
"Don't need exception table!");
1137 for (
int State = 0; State < NumStates; ++State) {
1140 HandlerStates[HandlerBlock] = State;
1144 assert(
FuncInfo.ClrEHUnwindMap[State].HandlerParentState < State &&
1145 "ill-formed state numbering");
1148 HandlerStates[&MF->
front()] = NullState;
1152 OS.emitInt32(0xffffffff);
1154 OS.emitInt32(NumStates);
1173 std::unique_ptr<MCSymbol *[]> EndSymbolMap(
new MCSymbol *[NumStates]);
1178 FuncletEnd = MF->
begin(),
1180 FuncletStart != End; FuncletStart = FuncletEnd) {
1181 int FuncletState = HandlerStates[&*FuncletStart];
1184 while (++FuncletEnd != End) {
1185 if (FuncletEnd->isEHFuncletEntry()) {
1192 OS.emitValue(getOffset(EndSymbol, FuncBeginSym), 4);
1193 if (FuncletState != NullState) {
1195 EndSymbolMap[FuncletState] = EndSymbol;
1200 const MCSymbol *CurrentStartLabel =
nullptr;
1201 int CurrentState = NullState;
1203 for (
const auto &StateChange :
1204 InvokeStateChangeIterator::range(
FuncInfo, FuncletStart, FuncletEnd)) {
1206 int StillPendingState =
1208 while (CurrentState != StillPendingState) {
1209 assert(CurrentState != NullState &&
1210 "Failed to find still-pending state!");
1212 Clauses.
push_back({CurrentStartLabel, StateChange.PreviousEndLabel,
1213 CurrentState, FuncletState});
1215 CurrentState =
FuncInfo.ClrEHUnwindMap[CurrentState].TryParentState;
1218 if (HandlerStack.
back().second == CurrentState)
1222 if (StateChange.NewState != CurrentState) {
1226 for (
int EnteredState = StateChange.NewState;
1227 EnteredState != CurrentState;
1229 FuncInfo.ClrEHUnwindMap[EnteredState].TryParentState) {
1230 int &MinEnclosingState = MinClauseMap[EnteredState];
1231 if (FuncletState < MinEnclosingState)
1232 MinEnclosingState = FuncletState;
1236 HandlerStack.
emplace_back(CurrentStartLabel, CurrentState);
1237 CurrentStartLabel = StateChange.NewStartLabel;
1238 CurrentState = StateChange.NewState;
1245 OS.emitInt32(Clauses.
size());
1246 for (ClrClause &
Clause : Clauses) {
1295 const MCExpr *ClauseBegin =
1296 getOffsetPlusOne(
Clause.StartLabel, FuncBeginSym);
1297 const MCExpr *ClauseEnd = getOffsetPlusOne(
Clause.EndLabel, FuncBeginSym);
1302 const MCExpr *HandlerBegin = getOffset(BeginSym, FuncBeginSym);
1304 const MCExpr *HandlerEnd = getOffset(EndSym, FuncBeginSym);
1307 switch (Entry.HandlerType) {
1321 if (
Clause.EnclosingState != MinClauseMap[
Clause.State]) {
1327 OS.emitInt32(Flags);
1330 OS.emitValue(ClauseBegin, 4);
1331 OS.emitValue(ClauseEnd, 4);
1334 OS.emitValue(HandlerBegin, 4);
1335 OS.emitValue(HandlerEnd, 4);
1339 OS.emitInt32(Entry.TypeToken);
MachineBasicBlock MachineBasicBlock::iterator MBBI
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains constants used for implementing Dwarf debug support.
static Expected< BitVector > scan(StringRef &S, StringRef Original)
typename CallsiteContextGraph< DerivedCCG, FuncTy, CallTy >::FuncInfo FuncInfo
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
Representation of each machine instruction.
const Module * getModule() const
A Module instance is used to store all the information related to an LLVM module.
T get() const
Returns the value of the specified pointer type.
T dyn_cast() const
Returns the current pointer if it is of the specified pointer type, otherwise returns 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.
Iterator for intrusive lists based on ilist_node.
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.
DenseMap< MCSymbol *, std::pair< int, MCSymbol * > > LabelToStateMap
GlobalVariable * TypeDescriptor
union llvm::WinEHHandlerType::@239 CatchObj
The CatchObj starts out life as an LLVM alloca and is eventually turned frame index.
SmallVector< WinEHHandlerType, 1 > HandlerArray