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;
115 if (!shouldEmitPersonality && !shouldEmitMoves && !shouldEmitLSDA)
137 if (shouldEmitPersonality || shouldEmitLSDA) {
148 emitCSpecificHandlerTable(MF);
150 emitExceptHandlerTable(MF);
152 emitCXXFrameHandler3Table(MF);
154 emitCLRExceptionTable(MF);
177 return Ctx.getOrCreateSymbol(
"?" + HandlerPrefix +
"$" +
179 FuncLinkageName +
"@4HA");
184 CurrentFuncletEntry = &MBB;
208 if (shouldEmitMoves || shouldEmitPersonality) {
209 CurrentFuncletTextSection =
Asm->
OutStreamer->getCurrentSectionOnly();
213 if (shouldEmitPersonality) {
235 if (!CurrentFuncletEntry)
239 if (shouldEmitMoves || shouldEmitPersonality) {
254 Twine(
"$cppxdata$", FuncLinkageName));
260 emitCSpecificHandlerTable(MF);
271 CurrentFuncletEntry =
nullptr;
289 const MCExpr *WinException::getLabelPlusOne(
const MCSymbol *Label) {
302 const MCExpr *WinException::getOffsetPlusOne(
const MCSymbol *OffsetOf,
309 int WinException::getFrameIndexOffset(
int FrameIndex,
335 const int NullState = -1;
337 struct InvokeStateChange {
359 class InvokeStateChangeIterator {
365 : EHInfo(EHInfo), MFI(MFI), MFE(MFE), MBBI(MBBI), BaseState(BaseState) {
366 LastStateChange.PreviousEndLabel =
nullptr;
367 LastStateChange.NewStartLabel =
nullptr;
368 LastStateChange.NewState = BaseState;
379 auto BlockBegin = Begin->begin();
380 auto BlockEnd = std::prev(End)->end();
382 InvokeStateChangeIterator(EHInfo, Begin, End, BlockBegin, BaseState),
383 InvokeStateChangeIterator(EHInfo, End, End, BlockEnd, BaseState));
387 bool operator==(
const InvokeStateChangeIterator &
O)
const {
388 assert(BaseState == O.BaseState);
399 return CurrentEndLabel == O.CurrentEndLabel;
402 bool operator!=(
const InvokeStateChangeIterator &O)
const {
405 InvokeStateChange &
operator*() {
return LastStateChange; }
406 InvokeStateChange *operator->() {
return &LastStateChange; }
407 InvokeStateChangeIterator &operator++() {
return scan(); }
410 InvokeStateChangeIterator &
scan();
413 const MCSymbol *CurrentEndLabel =
nullptr;
417 InvokeStateChange LastStateChange;
418 bool VisitingInvoke =
false;
425 bool IsNewBlock =
false;
426 for (; MFI != MFE; ++MFI, IsNewBlock =
true) {
429 for (
auto MBBE = MFI->end(); MBBI != MBBE; ++MBBI) {
431 if (!VisitingInvoke && LastStateChange.NewState != BaseState &&
436 LastStateChange.PreviousEndLabel = CurrentEndLabel;
437 LastStateChange.NewStartLabel =
nullptr;
438 LastStateChange.NewState = BaseState;
439 CurrentEndLabel =
nullptr;
449 if (Label == CurrentEndLabel) {
450 VisitingInvoke =
false;
453 auto InvokeMapIter = EHInfo.LabelToStateMap.find(Label);
455 if (InvokeMapIter == EHInfo.LabelToStateMap.end())
457 auto &StateAndEnd = InvokeMapIter->second;
458 int NewState = StateAndEnd.first;
461 VisitingInvoke =
true;
462 if (NewState == LastStateChange.NewState) {
465 CurrentEndLabel = StateAndEnd.second;
469 LastStateChange.PreviousEndLabel = CurrentEndLabel;
470 LastStateChange.NewStartLabel = Label;
471 LastStateChange.NewState = NewState;
473 CurrentEndLabel = StateAndEnd.second;
480 if (LastStateChange.NewState != BaseState) {
482 LastStateChange.PreviousEndLabel = CurrentEndLabel;
483 LastStateChange.NewStartLabel =
nullptr;
484 LastStateChange.NewState = BaseState;
486 assert(CurrentEndLabel !=
nullptr);
490 CurrentEndLabel =
nullptr;
522 void WinException::emitCSpecificHandlerTable(
const MachineFunction *MF) {
527 bool VerboseAsm = OS.isVerboseAsm();
528 auto AddComment = [&](
const Twine &Comment) {
530 OS.AddComment(Comment);
549 const MCExpr *LabelDiff = getOffset(TableEnd, TableBegin);
552 AddComment(
"Number of call sites");
553 OS.EmitValue(EntryCount, 4);
555 OS.EmitLabel(TableBegin);
564 const MCSymbol *LastStartLabel =
nullptr;
565 int LastEHState = -1;
570 while (Stop != End && !Stop->isEHFuncletEntry())
572 for (
const auto &StateChange :
573 InvokeStateChangeIterator::range(FuncInfo, MF->
begin(), Stop)) {
576 if (LastEHState != -1)
577 emitSEHActionsForRange(FuncInfo, LastStartLabel,
578 StateChange.PreviousEndLabel, LastEHState);
579 LastStartLabel = StateChange.NewStartLabel;
580 LastEHState = StateChange.NewState;
583 OS.EmitLabel(TableEnd);
586 void WinException::emitSEHActionsForRange(
const WinEHFuncInfo &FuncInfo,
588 const MCSymbol *EndLabel,
int State) {
592 bool VerboseAsm = OS.isVerboseAsm();
593 auto AddComment = [&](
const Twine &Comment) {
595 OS.AddComment(Comment);
598 assert(BeginLabel && EndLabel);
599 while (State != -1) {
601 const MCExpr *FilterOrFinally;
602 const MCExpr *ExceptOrNull;
610 FilterOrFinally = UME.
Filter ? create32bitRef(UME.
Filter)
612 ExceptOrNull = create32bitRef(Handler->getSymbol());
615 AddComment(
"LabelStart");
616 OS.EmitValue(getLabelPlusOne(BeginLabel), 4);
617 AddComment(
"LabelEnd");
618 OS.EmitValue(getLabelPlusOne(EndLabel), 4);
619 AddComment(UME.
IsFinally ?
"FinallyFunclet" : UME.
Filter ?
"FilterFunction" 621 OS.EmitValue(FilterOrFinally, 4);
622 AddComment(UME.
IsFinally ?
"Null" :
"ExceptionHandler");
623 OS.EmitValue(ExceptOrNull, 4);
630 void WinException::emitCXXFrameHandler3Table(
const MachineFunction *MF) {
639 if (shouldEmitPersonality) {
644 computeIP2StateTable(MF, FuncInfo, IPToStateTable);
649 int UnwindHelpOffset = 0;
655 MCSymbol *TryBlockMapXData =
nullptr;
659 Twine(
"$stateUnwindMap$", FuncLinkageName));
663 if (!IPToStateTable.empty())
667 bool VerboseAsm = OS.isVerboseAsm();
668 auto AddComment = [&](
const Twine &Comment) {
670 OS.AddComment(Comment);
688 OS.EmitValueToAlignment(4);
689 OS.EmitLabel(FuncInfoXData);
691 AddComment(
"MagicNumber");
692 OS.EmitIntValue(0x19930522, 4);
694 AddComment(
"MaxState");
697 AddComment(
"UnwindMap");
698 OS.EmitValue(create32bitRef(UnwindMapXData), 4);
700 AddComment(
"NumTryBlocks");
703 AddComment(
"TryBlockMap");
704 OS.EmitValue(create32bitRef(TryBlockMapXData), 4);
706 AddComment(
"IPMapEntries");
707 OS.EmitIntValue(IPToStateTable.size(), 4);
709 AddComment(
"IPToStateXData");
710 OS.EmitValue(create32bitRef(IPToStateXData), 4);
713 AddComment(
"UnwindHelp");
714 OS.EmitIntValue(UnwindHelpOffset, 4);
717 AddComment(
"ESTypeList");
718 OS.EmitIntValue(0, 4);
720 AddComment(
"EHFlags");
721 OS.EmitIntValue(1, 4);
727 if (UnwindMapXData) {
728 OS.EmitLabel(UnwindMapXData);
732 AddComment(
"ToState");
733 OS.EmitIntValue(UME.
ToState, 4);
735 AddComment(
"Action");
736 OS.EmitValue(create32bitRef(CleanupSym), 4);
747 if (TryBlockMapXData) {
748 OS.EmitLabel(TryBlockMapXData);
753 MCSymbol *HandlerMapXData =
nullptr;
759 .
concat(FuncLinkageName));
767 "bad trymap interval");
769 AddComment(
"TryLow");
770 OS.EmitIntValue(TBME.
TryLow, 4);
772 AddComment(
"TryHigh");
773 OS.EmitIntValue(TBME.
TryHigh, 4);
775 AddComment(
"CatchHigh");
778 AddComment(
"NumCatches");
781 AddComment(
"HandlerArray");
782 OS.EmitValue(create32bitRef(HandlerMapXData), 4);
786 unsigned ParentFrameOffset = 0;
787 if (shouldEmitPersonality) {
794 MCSymbol *HandlerMapXData = HandlerMaps[
I];
795 if (!HandlerMapXData)
804 OS.EmitLabel(HandlerMapXData);
809 const MCExpr *FrameAllocOffsetRef =
nullptr;
812 assert(Offset != 0 &&
"Illegal offset for catch object!");
821 AddComment(
"Adjectives");
827 AddComment(
"CatchObjOffset");
828 OS.EmitValue(FrameAllocOffsetRef, 4);
830 AddComment(
"Handler");
831 OS.EmitValue(create32bitRef(HandlerSym), 4);
833 if (shouldEmitPersonality) {
834 AddComment(
"ParentFrameOffset");
835 OS.EmitIntValue(ParentFrameOffset, 4);
845 if (IPToStateXData) {
846 OS.EmitLabel(IPToStateXData);
847 for (
auto &IPStatePair : IPToStateTable) {
849 OS.EmitValue(IPStatePair.first, 4);
850 AddComment(
"ToState");
851 OS.EmitIntValue(IPStatePair.second, 4);
856 void WinException::computeIP2StateTable(
861 FuncletEnd = MF->
begin(),
863 FuncletStart != End; FuncletStart = FuncletEnd) {
865 while (++FuncletEnd != End) {
866 if (FuncletEnd->isEHFuncletEntry()) {
874 if (FuncletStart->isCleanupFuncletEntry())
879 if (FuncletStart == MF->
begin()) {
880 BaseState = NullState;
884 cast<FuncletPadInst>(FuncletStart->getBasicBlock()->getFirstNonPHI());
889 assert(StartLabel &&
"need local function start label");
890 IPToStateTable.push_back(
891 std::make_pair(create32bitRef(StartLabel), BaseState));
893 for (
const auto &StateChange : InvokeStateChangeIterator::range(
894 FuncInfo, FuncletStart, FuncletEnd, BaseState)) {
899 const MCSymbol *ChangeLabel = StateChange.NewStartLabel;
901 ChangeLabel = StateChange.PreviousEndLabel;
903 IPToStateTable.push_back(
904 std::make_pair(getLabelPlusOne(ChangeLabel), StateChange.NewState));
910 void WinException::emitEHRegistrationOffsetLabel(
const WinEHFuncInfo &FuncInfo,
945 auto AddComment = [&](
const Twine &Comment) {
951 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
962 if (PerName ==
"_except_handler4") {
985 int GSCookieOffset = -2;
996 int EHCookieOffset = 9999;
1004 AddComment(
"GSCookieOffset");
1006 AddComment(
"GSCookieXOROffset");
1008 AddComment(
"EHCookieOffset");
1010 AddComment(
"EHCookieXOROffset");
1023 AddComment(
"ToState");
1025 AddComment(UME.
IsFinally ?
"Null" :
"FilterFunction");
1027 AddComment(UME.
IsFinally ?
"FinallyFunclet" :
"ExceptionHandler");
1028 OS.
EmitValue(create32bitRef(ExceptOrFinally), 4);
1034 while (State != -1) {
1045 while (LeftRank < RightRank) {
1050 while (RightRank < LeftRank) {
1055 while (Left != Right) {
1084 assert(NumStates > 0 &&
"Don't need exception table!");
1086 for (
int State = 0; State < NumStates; ++State) {
1089 HandlerStates[HandlerBlock] = State;
1094 "ill-formed state numbering");
1097 HandlerStates[&MF->
front()] = NullState;
1122 std::unique_ptr<MCSymbol *[]> EndSymbolMap(
new MCSymbol *[NumStates]);
1127 FuncletEnd = MF->
begin(),
1129 FuncletStart != End; FuncletStart = FuncletEnd) {
1130 int FuncletState = HandlerStates[&*FuncletStart];
1133 while (++FuncletEnd != End) {
1134 if (FuncletEnd->isEHFuncletEntry()) {
1141 OS.
EmitValue(getOffset(EndSymbol, FuncBeginSym), 4);
1142 if (FuncletState != NullState) {
1144 EndSymbolMap[FuncletState] = EndSymbol;
1149 const MCSymbol *CurrentStartLabel =
nullptr;
1150 int CurrentState = NullState;
1152 for (
const auto &StateChange :
1153 InvokeStateChangeIterator::range(FuncInfo, FuncletStart, FuncletEnd)) {
1155 int StillPendingState =
1157 while (CurrentState != StillPendingState) {
1158 assert(CurrentState != NullState &&
1159 "Failed to find still-pending state!");
1161 Clauses.
push_back({CurrentStartLabel, StateChange.PreviousEndLabel,
1162 CurrentState, FuncletState});
1164 CurrentState = FuncInfo.
ClrEHUnwindMap[CurrentState].TryParentState;
1167 if (HandlerStack.
back().second == CurrentState)
1171 if (StateChange.NewState != CurrentState) {
1175 for (
int EnteredState = StateChange.NewState;
1176 EnteredState != CurrentState;
1179 int &MinEnclosingState = MinClauseMap[EnteredState];
1180 if (FuncletState < MinEnclosingState)
1181 MinEnclosingState = FuncletState;
1185 HandlerStack.
emplace_back(CurrentStartLabel, CurrentState);
1186 CurrentStartLabel = StateChange.NewStartLabel;
1187 CurrentState = StateChange.NewState;
1195 for (ClrClause &Clause : Clauses) {
1244 const MCExpr *ClauseBegin =
1245 getOffsetPlusOne(Clause.StartLabel, FuncBeginSym);
1246 const MCExpr *ClauseEnd = getOffsetPlusOne(Clause.EndLabel, FuncBeginSym);
1251 const MCExpr *HandlerBegin = getOffset(BeginSym, FuncBeginSym);
1252 MCSymbol *EndSym = EndSymbolMap[Clause.State];
1253 const MCExpr *HandlerEnd = getOffset(EndSym, FuncBeginSym);
1270 if (Clause.EnclosingState != MinClauseMap[Clause.State]) {
1273 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...
void push_back(const T &Elt)
bool usesWindowsCFI() const
SmallVector< WinEHHandlerType, 1 > HandlerArray
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
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)
Compute iterated dominance frontiers using a linear time algorithm.
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 ...
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.
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
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 ...
MachineModuleInfo * MMI
Collected machine module information.
MBBOrBasicBlock Handler
Holds the __except or __finally basic block.
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...
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.
unsigned getAlignment() const
getAlignment - Return the alignment (log2, not bytes) of the function.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
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.
void emitExceptionTable()
Emit landing pads and actions.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
MCSymbol * getFunctionBegin() const
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())
unsigned getLSDAEncoding() const
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)
void EmitAlignment(unsigned NumBits, const GlobalObject *GV=nullptr) const
Emit an alignment directive to the specified power of two boundary.
unsigned getAlignment() const
Return alignment of the basic block.
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.
unsigned getPersonalityEncoding() const
T dyn_cast() const
Returns the current pointer if it is of the specified pointer type, otherwises returns null...
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.
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...
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.
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.
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.
void emplace_back(ArgTypes &&... Args)
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)
union llvm::WinEHHandlerType::@174 CatchObj
The CatchObj starts out life as an LLVM alloca and is eventually turned frame index.
T get() const
Returns the value of the specified pointer type.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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 const MCConstantExpr * create(int64_t Value, MCContext &Ctx)
static Expected< BitVector > scan(StringRef &S, StringRef Original)
This file describes how to lower LLVM code to machine code.
void tidyLandingPads(DenseMap< MCSymbol *, uintptr_t > *LPMap=nullptr)
Remap landing pad labels and remove any deleted landing pads.
A function that returns a base type.