55 if (
F.hasFnAttribute(
"safeseh"))
60 shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA =
false;
84 shouldEmitPersonality =
85 forceEmitPersonality || ((hasLandingPads || hasEHFunclets) &&
89 shouldEmitLSDA = shouldEmitPersonality &&
102 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
104 shouldEmitLSDA = hasEHFunclets;
105 shouldEmitPersonality =
false;
113 if (isAArch64 && CurrentFuncletEntry &&
114 (shouldEmitMoves || shouldEmitPersonality))
121 if (!shouldEmitPersonality && !shouldEmitMoves && !shouldEmitLSDA)
143 if (shouldEmitPersonality || shouldEmitLSDA) {
154 emitCSpecificHandlerTable(MF);
156 emitExceptHandlerTable(MF);
158 emitCXXFrameHandler3Table(MF);
160 emitCLRExceptionTable(MF);
183 return Ctx.getOrCreateSymbol(
"?" + HandlerPrefix +
"$" +
185 FuncLinkageName +
"@4HA");
190 CurrentFuncletEntry = &MBB;
214 if (shouldEmitMoves || shouldEmitPersonality) {
215 CurrentFuncletTextSection =
Asm->
OutStreamer->getCurrentSectionOnly();
219 if (shouldEmitPersonality) {
240 if (isAArch64 && CurrentFuncletEntry &&
241 (shouldEmitMoves || shouldEmitPersonality)) {
248 void WinException::endFuncletImpl() {
250 if (!CurrentFuncletEntry)
254 if (shouldEmitMoves || shouldEmitPersonality) {
278 Twine(
"$cppxdata$", FuncLinkageName));
284 emitCSpecificHandlerTable(MF);
295 CurrentFuncletEntry =
nullptr;
329 const MCExpr *WinException::getOffsetPlusOne(
const MCSymbol *OffsetOf,
336 int WinException::getFrameIndexOffset(
int FrameIndex,
362 const int NullState = -1;
364 struct InvokeStateChange {
386 class InvokeStateChangeIterator {
392 : EHInfo(EHInfo), MFI(MFI), MFE(MFE), MBBI(MBBI), BaseState(BaseState) {
393 LastStateChange.PreviousEndLabel =
nullptr;
394 LastStateChange.NewStartLabel =
nullptr;
395 LastStateChange.NewState = BaseState;
406 auto BlockBegin = Begin->begin();
407 auto BlockEnd = std::prev(End)->end();
409 InvokeStateChangeIterator(EHInfo, Begin, End, BlockBegin, BaseState),
410 InvokeStateChangeIterator(EHInfo, End, End, BlockEnd, BaseState));
414 bool operator==(
const InvokeStateChangeIterator &
O)
const {
415 assert(BaseState == O.BaseState);
426 return CurrentEndLabel == O.CurrentEndLabel;
429 bool operator!=(
const InvokeStateChangeIterator &O)
const {
432 InvokeStateChange &
operator*() {
return LastStateChange; }
433 InvokeStateChange *operator->() {
return &LastStateChange; }
434 InvokeStateChangeIterator &operator++() {
return scan(); }
437 InvokeStateChangeIterator &
scan();
440 const MCSymbol *CurrentEndLabel =
nullptr;
444 InvokeStateChange LastStateChange;
445 bool VisitingInvoke =
false;
452 bool IsNewBlock =
false;
453 for (; MFI != MFE; ++MFI, IsNewBlock =
true) {
456 for (
auto MBBE = MFI->end(); MBBI != MBBE; ++MBBI) {
458 if (!VisitingInvoke && LastStateChange.NewState != BaseState &&
463 LastStateChange.PreviousEndLabel = CurrentEndLabel;
464 LastStateChange.NewStartLabel =
nullptr;
465 LastStateChange.NewState = BaseState;
466 CurrentEndLabel =
nullptr;
476 if (Label == CurrentEndLabel) {
477 VisitingInvoke =
false;
480 auto InvokeMapIter = EHInfo.LabelToStateMap.find(Label);
482 if (InvokeMapIter == EHInfo.LabelToStateMap.end())
484 auto &StateAndEnd = InvokeMapIter->second;
485 int NewState = StateAndEnd.first;
488 VisitingInvoke =
true;
489 if (NewState == LastStateChange.NewState) {
492 CurrentEndLabel = StateAndEnd.second;
496 LastStateChange.PreviousEndLabel = CurrentEndLabel;
497 LastStateChange.NewStartLabel = Label;
498 LastStateChange.NewState = NewState;
500 CurrentEndLabel = StateAndEnd.second;
507 if (LastStateChange.NewState != BaseState) {
509 LastStateChange.PreviousEndLabel = CurrentEndLabel;
510 LastStateChange.NewStartLabel =
nullptr;
511 LastStateChange.NewState = BaseState;
513 assert(CurrentEndLabel !=
nullptr);
517 CurrentEndLabel =
nullptr;
549 void WinException::emitCSpecificHandlerTable(
const MachineFunction *MF) {
554 bool VerboseAsm = OS.isVerboseAsm();
555 auto AddComment = [&](
const Twine &Comment) {
557 OS.AddComment(Comment);
578 const MCExpr *LabelDiff = getOffset(TableEnd, TableBegin);
581 AddComment(
"Number of call sites");
582 OS.EmitValue(EntryCount, 4);
584 OS.EmitLabel(TableBegin);
593 const MCSymbol *LastStartLabel =
nullptr;
594 int LastEHState = -1;
599 while (Stop != End && !Stop->isEHFuncletEntry())
601 for (
const auto &StateChange :
602 InvokeStateChangeIterator::range(FuncInfo, MF->
begin(), Stop)) {
605 if (LastEHState != -1)
606 emitSEHActionsForRange(FuncInfo, LastStartLabel,
607 StateChange.PreviousEndLabel, LastEHState);
608 LastStartLabel = StateChange.NewStartLabel;
609 LastEHState = StateChange.NewState;
612 OS.EmitLabel(TableEnd);
615 void WinException::emitSEHActionsForRange(
const WinEHFuncInfo &FuncInfo,
617 const MCSymbol *EndLabel,
int State) {
620 bool VerboseAsm = OS.isVerboseAsm();
621 auto AddComment = [&](
const Twine &Comment) {
623 OS.AddComment(Comment);
626 assert(BeginLabel && EndLabel);
627 while (State != -1) {
629 const MCExpr *FilterOrFinally;
630 const MCExpr *ExceptOrNull;
638 FilterOrFinally = UME.
Filter ? create32bitRef(UME.
Filter)
640 ExceptOrNull = create32bitRef(Handler->getSymbol());
643 AddComment(
"LabelStart");
644 OS.EmitValue(getLabel(BeginLabel), 4);
645 AddComment(
"LabelEnd");
646 OS.EmitValue(getLabel(EndLabel), 4);
647 AddComment(UME.
IsFinally ?
"FinallyFunclet" : UME.
Filter ?
"FilterFunction" 649 OS.EmitValue(FilterOrFinally, 4);
650 AddComment(UME.
IsFinally ?
"Null" :
"ExceptionHandler");
651 OS.EmitValue(ExceptOrNull, 4);
658 void WinException::emitCXXFrameHandler3Table(
const MachineFunction *MF) {
667 if (shouldEmitPersonality) {
672 computeIP2StateTable(MF, FuncInfo, IPToStateTable);
677 int UnwindHelpOffset = 0;
683 MCSymbol *TryBlockMapXData =
nullptr;
687 Twine(
"$stateUnwindMap$", FuncLinkageName));
691 if (!IPToStateTable.empty())
695 bool VerboseAsm = OS.isVerboseAsm();
696 auto AddComment = [&](
const Twine &Comment) {
698 OS.AddComment(Comment);
716 OS.EmitValueToAlignment(4);
717 OS.EmitLabel(FuncInfoXData);
719 AddComment(
"MagicNumber");
720 OS.EmitIntValue(0x19930522, 4);
722 AddComment(
"MaxState");
725 AddComment(
"UnwindMap");
726 OS.EmitValue(create32bitRef(UnwindMapXData), 4);
728 AddComment(
"NumTryBlocks");
731 AddComment(
"TryBlockMap");
732 OS.EmitValue(create32bitRef(TryBlockMapXData), 4);
734 AddComment(
"IPMapEntries");
735 OS.EmitIntValue(IPToStateTable.size(), 4);
737 AddComment(
"IPToStateXData");
738 OS.EmitValue(create32bitRef(IPToStateXData), 4);
741 AddComment(
"UnwindHelp");
742 OS.EmitIntValue(UnwindHelpOffset, 4);
745 AddComment(
"ESTypeList");
746 OS.EmitIntValue(0, 4);
748 AddComment(
"EHFlags");
749 OS.EmitIntValue(1, 4);
755 if (UnwindMapXData) {
756 OS.EmitLabel(UnwindMapXData);
760 AddComment(
"ToState");
761 OS.EmitIntValue(UME.
ToState, 4);
763 AddComment(
"Action");
764 OS.EmitValue(create32bitRef(CleanupSym), 4);
775 if (TryBlockMapXData) {
776 OS.EmitLabel(TryBlockMapXData);
781 MCSymbol *HandlerMapXData =
nullptr;
787 .
concat(FuncLinkageName));
795 "bad trymap interval");
797 AddComment(
"TryLow");
798 OS.EmitIntValue(TBME.
TryLow, 4);
800 AddComment(
"TryHigh");
801 OS.EmitIntValue(TBME.
TryHigh, 4);
803 AddComment(
"CatchHigh");
806 AddComment(
"NumCatches");
809 AddComment(
"HandlerArray");
810 OS.EmitValue(create32bitRef(HandlerMapXData), 4);
814 unsigned ParentFrameOffset = 0;
815 if (shouldEmitPersonality) {
822 MCSymbol *HandlerMapXData = HandlerMaps[
I];
823 if (!HandlerMapXData)
832 OS.EmitLabel(HandlerMapXData);
837 const MCExpr *FrameAllocOffsetRef =
nullptr;
840 assert(Offset != 0 &&
"Illegal offset for catch object!");
849 AddComment(
"Adjectives");
855 AddComment(
"CatchObjOffset");
856 OS.EmitValue(FrameAllocOffsetRef, 4);
858 AddComment(
"Handler");
859 OS.EmitValue(create32bitRef(HandlerSym), 4);
861 if (shouldEmitPersonality) {
862 AddComment(
"ParentFrameOffset");
863 OS.EmitIntValue(ParentFrameOffset, 4);
873 if (IPToStateXData) {
874 OS.EmitLabel(IPToStateXData);
875 for (
auto &IPStatePair : IPToStateTable) {
877 OS.EmitValue(IPStatePair.first, 4);
878 AddComment(
"ToState");
879 OS.EmitIntValue(IPStatePair.second, 4);
884 void WinException::computeIP2StateTable(
889 FuncletEnd = MF->
begin(),
891 FuncletStart != End; FuncletStart = FuncletEnd) {
893 while (++FuncletEnd != End) {
894 if (FuncletEnd->isEHFuncletEntry()) {
902 if (FuncletStart->isCleanupFuncletEntry())
907 if (FuncletStart == MF->
begin()) {
908 BaseState = NullState;
912 cast<FuncletPadInst>(FuncletStart->getBasicBlock()->getFirstNonPHI());
917 assert(StartLabel &&
"need local function start label");
918 IPToStateTable.push_back(
919 std::make_pair(create32bitRef(StartLabel), BaseState));
921 for (
const auto &StateChange : InvokeStateChangeIterator::range(
922 FuncInfo, FuncletStart, FuncletEnd, BaseState)) {
927 const MCSymbol *ChangeLabel = StateChange.NewStartLabel;
929 ChangeLabel = StateChange.PreviousEndLabel;
931 IPToStateTable.push_back(
932 std::make_pair(getLabel(ChangeLabel), StateChange.NewState));
938 void WinException::emitEHRegistrationOffsetLabel(
const WinEHFuncInfo &FuncInfo,
972 auto AddComment = [&](
const Twine &Comment) {
978 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
988 if (PerName ==
"_except_handler4") {
1011 int GSCookieOffset = -2;
1022 int EHCookieOffset = 9999;
1030 AddComment(
"GSCookieOffset");
1032 AddComment(
"GSCookieXOROffset");
1034 AddComment(
"EHCookieOffset");
1036 AddComment(
"EHCookieXOROffset");
1049 AddComment(
"ToState");
1051 AddComment(UME.
IsFinally ?
"Null" :
"FilterFunction");
1053 AddComment(UME.
IsFinally ?
"FinallyFunclet" :
"ExceptionHandler");
1054 OS.
EmitValue(create32bitRef(ExceptOrFinally), 4);
1060 while (State != -1) {
1071 while (LeftRank < RightRank) {
1076 while (RightRank < LeftRank) {
1081 while (Left != Right) {
1110 assert(NumStates > 0 &&
"Don't need exception table!");
1112 for (
int State = 0; State < NumStates; ++State) {
1115 HandlerStates[HandlerBlock] = State;
1120 "ill-formed state numbering");
1123 HandlerStates[&MF->
front()] = NullState;
1148 std::unique_ptr<MCSymbol *[]> EndSymbolMap(
new MCSymbol *[NumStates]);
1153 FuncletEnd = MF->
begin(),
1155 FuncletStart != End; FuncletStart = FuncletEnd) {
1156 int FuncletState = HandlerStates[&*FuncletStart];
1159 while (++FuncletEnd != End) {
1160 if (FuncletEnd->isEHFuncletEntry()) {
1167 OS.
EmitValue(getOffset(EndSymbol, FuncBeginSym), 4);
1168 if (FuncletState != NullState) {
1170 EndSymbolMap[FuncletState] = EndSymbol;
1175 const MCSymbol *CurrentStartLabel =
nullptr;
1176 int CurrentState = NullState;
1178 for (
const auto &StateChange :
1179 InvokeStateChangeIterator::range(FuncInfo, FuncletStart, FuncletEnd)) {
1181 int StillPendingState =
1183 while (CurrentState != StillPendingState) {
1184 assert(CurrentState != NullState &&
1185 "Failed to find still-pending state!");
1187 Clauses.
push_back({CurrentStartLabel, StateChange.PreviousEndLabel,
1188 CurrentState, FuncletState});
1190 CurrentState = FuncInfo.
ClrEHUnwindMap[CurrentState].TryParentState;
1193 if (HandlerStack.
back().second == CurrentState)
1197 if (StateChange.NewState != CurrentState) {
1201 for (
int EnteredState = StateChange.NewState;
1202 EnteredState != CurrentState;
1205 int &MinEnclosingState = MinClauseMap[EnteredState];
1206 if (FuncletState < MinEnclosingState)
1207 MinEnclosingState = FuncletState;
1211 HandlerStack.
emplace_back(CurrentStartLabel, CurrentState);
1212 CurrentStartLabel = StateChange.NewStartLabel;
1213 CurrentState = StateChange.NewState;
1221 for (ClrClause &Clause : Clauses) {
1270 const MCExpr *ClauseBegin =
1271 getOffsetPlusOne(Clause.StartLabel, FuncBeginSym);
1272 const MCExpr *ClauseEnd = getOffsetPlusOne(Clause.EndLabel, FuncBeginSym);
1277 const MCExpr *HandlerBegin = getOffset(BeginSym, FuncBeginSym);
1278 MCSymbol *EndSym = EndSymbolMap[Clause.State];
1279 const MCExpr *HandlerEnd = getOffset(EndSym, FuncBeginSym);
1296 if (Clause.EnclosingState != MinClauseMap[Clause.State]) {
1299 assert(Clause.EnclosingState > MinClauseMap[Clause.State]);
detail::concat_range< ValueT, RangeTs... > concat(RangeTs &&... Ranges)
Concatenated range across two or more ranges.
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
Instances of this class represent a uniqued identifier for a section in the current translation unit...
reference emplace_back(ArgTypes &&... Args)
bool usesWindowsCFI() const
SmallVector< WinEHHandlerType, 1 > HandlerArray
bool isCall(QueryType Type=AnyInBundle) const
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
static int getTryAncestor(const WinEHFuncInfo &FuncInfo, int Left, int Right)
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
This class represents lattice values for constants.
static MCSymbol * getMCSymbolForMBB(AsmPrinter *Asm, const MachineBasicBlock *MBB)
Retrieve the MCSymbol for a GlobalValue or MachineBasicBlock.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Align getAlignment() const
getAlignment - Return the alignment of the function.
A Module instance is used to store all the information related to an LLVM module. ...
bool hasStackProtectorIndex() const
SmallVector< SEHUnwindMapEntry, 4 > SEHUnwindMap
virtual int getFrameIndexReference(const MachineFunction &MF, int FI, unsigned &FrameReg) const
getFrameIndexReference - This method should return the base register and offset used to reference a f...
MCContext & OutContext
This is the context for the output file that we are streaming.
void push_back(const T &Elt)
bool isCleanupFuncletEntry() const
Returns true if this is the entry block of a cleanup funclet.
void beginFunclet(const MachineBasicBlock &MBB, MCSymbol *Sym) override
Emit target-specific EH funclet machinery.
DenseMap< const FuncletPadInst *, int > FuncletBaseStateMap
static bool callToNoUnwindFunction(const MachineInstr *MI)
Return `true' if this is a call to a function marked `nounwind'.
virtual const TargetLowering * getTargetLowering() const
void EmitAlignment(Align Alignment, const GlobalObject *GV=nullptr) const
Emit an alignment directive to the specified power of two boundary.
MCSymbol * getOrCreateParentFrameOffsetSymbol(StringRef FuncName)
unsigned getPointerSizeInBits(unsigned AS=0) const
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients ...
MachineFunction * MF
The current machine function.
virtual int getFrameIndexReferencePreferSP(const MachineFunction &MF, int FI, unsigned &FrameReg, bool IgnoreSPUpdates) const
Same as getFrameIndexReference, except that the stack pointer (as opposed to the frame pointer) will ...
T get() const
Returns the value of the specified pointer type.
MachineModuleInfo * MMI
Collected machine module information.
MBBOrBasicBlock Handler
Holds the __except or __finally basic block.
T dyn_cast() const
Returns the current pointer if it is of the specified pointer type, otherwises returns null...
void endModule() override
Emit all exception information that should come after the content.
Emits exception handling directives.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool isAArch64() const
Tests whether the target is AArch64 (little and big endian).
static const MCBinaryExpr * createDiv(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Base class for the full range of assembler expressions which are needed for parsing.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
unsigned getLSDAEncoding() const
Align getAlignment() const
Return alignment of the basic block.
APInt operator*(APInt a, uint64_t RHS)
virtual unsigned getWinEHParentFrameOffset(const MachineFunction &MF) const
int ToState
If unwinding continues through this handler, transition to the handler at this state.
Context object for machine code objects.
virtual void AddComment(const Twine &T, bool EOL=true)
Add a textual comment.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
MCSymbol * getFunctionBegin() const
virtual int getNonLocalFrameIndexReference(const MachineFunction &MF, int FI) const
getNonLocalFrameIndexReference - This method returns the offset used to reference a frame index locat...
void tidyLandingPads(DenseMap< MCSymbol *, uintptr_t > *LPMap=nullptr, bool TidyIfNoBeginLabels=true)
Remap landing pad labels and remove any deleted landing pads.
bool hasPersonalityFn() const
Check whether this function has a personality function.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
void endFunclet() override
virtual void EmitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers...
void EmitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false)
Similar to CxxUnwindMapEntry, but supports SEH filters.
SmallVector< ClrEHUnwindMapEntry, 4 > ClrEHUnwindMap
Streaming machine code generation interface.
MCSymbol * createTempSymbol(bool CanBeUnnamed=true)
Create and return a new assembler temporary symbol with a unique but unspecified name.
MCSymbol * CurrentFnSym
The symbol for the current function.
const MCAsmInfo * MAI
Target Asm Printer information.
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.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
bool hasEHFunclets() const
WinException(AsmPrinter *A)
TargetMachine & TM
Target machine description.
int getStackProtectorIndex() const
Return the index for the stack protector object.
This class is intended to be used as a driving class for all asm writers.
void endFunction(const MachineFunction *) override
Gather and emit post-function exception information.
EHPersonality classifyEHPersonality(const Value *Pers)
See if the given exception handling personality function is one that we understand.
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
const Triple & getTargetTriple() const
const Constant * stripPointerCasts() const
const MachineBasicBlock & front() const
AsmPrinter * Asm
Target of directive emission.
void beginFunction(const MachineFunction *MF) override
Gather pre-function exception information.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
SmallVector< CxxUnwindMapEntry, 4 > CxxUnwindMap
const std::vector< LandingPadInfo > & getLandingPads() const
Return a reference to the landing pad info for the current function.
const Function * Filter
Holds the filter expression function.
Iterator for intrusive lists based on ilist_node.
Align max(MaybeAlign Lhs, Align Rhs)
MCSymbol * getOrCreateLSDASymbol(StringRef FuncName)
bool isFuncletEHPersonality(EHPersonality Pers)
Returns true if this is a personality function that invokes handler funclets (which must return to it...
unsigned getPersonalityEncoding() const
MCSymbol * getSymbol(const GlobalValue *GV) const
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
void markFunctionEnd() override
Information about stack frame layout on the target.
LLVM_NODISCARD T pop_back_val()
const WinEHFuncInfo * getWinEHFuncInfo() const
getWinEHFuncInfo - Return information about how the current function uses Windows exception handling...
MCSymbol * getFunctionEnd() const
const Function & getFunction() const
Return the LLVM function that this machine code represents.
bool needsUnwindTableEntry() const
True if this function needs an unwind table.
SmallVector< WinEHTryBlockMapEntry, 4 > TryBlockMap
A range adaptor for a pair of iterators.
This file contains constants used for implementing Dwarf debug support.
static StringRef dropLLVMManglingEscape(StringRef Name)
If the given string begins with the GlobalValue name mangling escape character '\1', drop it.
union llvm::WinEHHandlerType::@202 CatchObj
The CatchObj starts out life as an LLVM alloca and is eventually turned frame index.
GlobalVariable * TypeDescriptor
bool operator!=(uint64_t V1, const APInt &V2)
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
LLVM_NODISCARD bool empty() const
bool isEHFuncletEntry() const
Returns true if this is the entry block of an EH funclet.
StringRef getName() const
Return a constant reference to the value's name.
virtual const TargetFrameLowering * getFrameLowering() const
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
ClrHandlerType HandlerType
const Module * getModule() const
static int getTryRank(const WinEHFuncInfo &FuncInfo, int State)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCSymbol * emitExceptionTable()
Emit landing pads and actions.
MCSymbol * getMCSymbol() const
LLVM Value Representation.
Constant * getPersonalityFn() const
Get the personality function associated with this function.
unsigned getStackPointerRegisterToSaveRestore() const
If a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save...
virtual void EmitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
const DataLayout & getDataLayout() const
Return information about data layout.
StringRef - Represent a constant reference to a string, i.e.
bool operator==(uint64_t V1, const APInt &V2)
virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
virtual bool isVerboseAsm() const
Return true if this streamer supports verbose assembly and if it is enabled.
const MachineOperand & getOperand(unsigned i) const
bool isNoOpWithoutInvoke(EHPersonality Pers)
Return true if this personality may be safely removed if there are no invoke instructions remaining i...
static Expected< BitVector > scan(StringRef &S, StringRef Original)
This file describes how to lower LLVM code to machine code.
A function that returns a base type.