44 useImageRel32 = (A->getDataLayout().getPointerSizeInBits() == 64);
56 if (
F.hasFnAttribute(
"safeseh"))
61 shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA =
false;
76 if (
F.hasPersonalityFn()) {
77 PerFn = dyn_cast<Function>(
F.getPersonalityFn()->stripPointerCasts());
81 bool forceEmitPersonality =
F.hasPersonalityFn() &&
83 F.needsUnwindTableEntry();
85 shouldEmitPersonality =
86 forceEmitPersonality || ((hasLandingPads || hasEHFunclets) &&
90 shouldEmitLSDA = shouldEmitPersonality &&
103 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
105 shouldEmitLSDA = hasEHFunclets;
106 shouldEmitPersonality =
false;
114 if (isAArch64 && CurrentFuncletEntry &&
115 (shouldEmitMoves || shouldEmitPersonality))
122 if (!shouldEmitPersonality && !shouldEmitMoves && !shouldEmitLSDA)
127 if (
F.hasPersonalityFn())
144 if (shouldEmitPersonality || shouldEmitLSDA) {
155 emitCSpecificHandlerTable(MF);
157 emitExceptHandlerTable(MF);
159 emitCXXFrameHandler3Table(MF);
161 emitCLRExceptionTable(MF);
184 return Ctx.getOrCreateSymbol(
"?" + HandlerPrefix +
"$" +
186 FuncLinkageName +
"@4HA");
191 CurrentFuncletEntry = &
MBB;
215 if (shouldEmitMoves || shouldEmitPersonality) {
216 CurrentFuncletTextSection =
Asm->
OutStreamer->getCurrentSectionOnly();
220 if (shouldEmitPersonality) {
225 if (
F.hasPersonalityFn())
226 PerFn = dyn_cast<Function>(
F.getPersonalityFn()->stripPointerCasts());
241 if (isAArch64 && CurrentFuncletEntry &&
242 (shouldEmitMoves || shouldEmitPersonality)) {
249 void WinException::endFuncletImpl() {
251 if (!CurrentFuncletEntry)
255 if (shouldEmitMoves || shouldEmitPersonality) {
258 if (
F.hasPersonalityFn())
270 Twine(
"$cppxdata$", FuncLinkageName));
279 emitCSpecificHandlerTable(MF);
280 }
else if (shouldEmitPersonality || shouldEmitLSDA) {
300 CurrentFuncletEntry =
nullptr;
334 const MCExpr *WinException::getOffsetPlusOne(
const MCSymbol *OffsetOf,
341 int WinException::getFrameIndexOffset(
int FrameIndex,
362 "Frame offsets with a scalable component are not supported");
369 const int NullState = -1;
371 struct InvokeStateChange {
393 class InvokeStateChangeIterator {
399 : EHInfo(EHInfo), MFI(MFI), MFE(MFE),
MBBI(
MBBI), BaseState(BaseState) {
400 LastStateChange.PreviousEndLabel =
nullptr;
401 LastStateChange.NewStartLabel =
nullptr;
402 LastStateChange.NewState = BaseState;
413 auto BlockBegin = Begin->begin();
414 auto BlockEnd = std::prev(End)->end();
416 InvokeStateChangeIterator(EHInfo, Begin, End, BlockBegin, BaseState),
417 InvokeStateChangeIterator(EHInfo, End, End, BlockEnd, BaseState));
421 bool operator==(
const InvokeStateChangeIterator &
O)
const {
422 assert(BaseState ==
O.BaseState);
433 return CurrentEndLabel ==
O.CurrentEndLabel;
436 bool operator!=(
const InvokeStateChangeIterator &
O)
const {
439 InvokeStateChange &
operator*() {
return LastStateChange; }
440 InvokeStateChange *operator->() {
return &LastStateChange; }
441 InvokeStateChangeIterator &operator++() {
return scan(); }
444 InvokeStateChangeIterator &
scan();
447 const MCSymbol *CurrentEndLabel =
nullptr;
451 InvokeStateChange LastStateChange;
452 bool VisitingInvoke =
false;
459 bool IsNewBlock =
false;
460 for (; MFI != MFE; ++MFI, IsNewBlock =
true) {
463 for (
auto MBBE = MFI->end();
MBBI != MBBE; ++
MBBI) {
465 if (!VisitingInvoke && LastStateChange.NewState != BaseState &&
470 LastStateChange.PreviousEndLabel = CurrentEndLabel;
471 LastStateChange.NewStartLabel =
nullptr;
472 LastStateChange.NewState = BaseState;
473 CurrentEndLabel =
nullptr;
483 if (Label == CurrentEndLabel) {
484 VisitingInvoke =
false;
491 auto &StateAndEnd = InvokeMapIter->second;
492 int NewState = StateAndEnd.first;
495 VisitingInvoke =
true;
496 if (NewState == LastStateChange.NewState) {
499 CurrentEndLabel = StateAndEnd.second;
503 LastStateChange.PreviousEndLabel = CurrentEndLabel;
504 LastStateChange.NewStartLabel =
Label;
505 LastStateChange.NewState = NewState;
507 CurrentEndLabel = StateAndEnd.second;
514 if (LastStateChange.NewState != BaseState) {
516 LastStateChange.PreviousEndLabel = CurrentEndLabel;
517 LastStateChange.NewStartLabel =
nullptr;
518 LastStateChange.NewState = BaseState;
520 assert(CurrentEndLabel !=
nullptr);
524 CurrentEndLabel =
nullptr;
556 void WinException::emitCSpecificHandlerTable(
const MachineFunction *MF) {
561 bool VerboseAsm = OS.isVerboseAsm();
562 auto AddComment = [&](
const Twine &Comment) {
564 OS.AddComment(Comment);
585 const MCExpr *LabelDiff = getOffset(TableEnd, TableBegin);
588 AddComment(
"Number of call sites");
589 OS.emitValue(EntryCount, 4);
591 OS.emitLabel(TableBegin);
600 const MCSymbol *LastStartLabel =
nullptr;
601 int LastEHState = -1;
606 while (Stop != End && !Stop->isEHFuncletEntry())
608 for (
const auto &StateChange :
609 InvokeStateChangeIterator::range(FuncInfo, MF->
begin(), Stop)) {
612 if (LastEHState != -1)
613 emitSEHActionsForRange(FuncInfo, LastStartLabel,
614 StateChange.PreviousEndLabel, LastEHState);
615 LastStartLabel = StateChange.NewStartLabel;
616 LastEHState = StateChange.NewState;
619 OS.emitLabel(TableEnd);
622 void WinException::emitSEHActionsForRange(
const WinEHFuncInfo &FuncInfo,
624 const MCSymbol *EndLabel,
int State) {
627 bool VerboseAsm = OS.isVerboseAsm();
628 auto AddComment = [&](
const Twine &Comment) {
630 OS.AddComment(Comment);
633 assert(BeginLabel && EndLabel);
634 while (State != -1) {
636 const MCExpr *FilterOrFinally;
637 const MCExpr *ExceptOrNull;
645 FilterOrFinally = UME.
Filter ? create32bitRef(UME.
Filter)
647 ExceptOrNull = create32bitRef(Handler->getSymbol());
650 AddComment(
"LabelStart");
651 OS.emitValue(getLabel(BeginLabel), 4);
652 AddComment(
"LabelEnd");
653 OS.emitValue(getLabel(EndLabel), 4);
654 AddComment(UME.
IsFinally ?
"FinallyFunclet" : UME.
Filter ?
"FilterFunction" 656 OS.emitValue(FilterOrFinally, 4);
657 AddComment(UME.
IsFinally ?
"Null" :
"ExceptionHandler");
658 OS.emitValue(ExceptOrNull, 4);
665 void WinException::emitCXXFrameHandler3Table(
const MachineFunction *MF) {
674 if (shouldEmitPersonality) {
679 computeIP2StateTable(MF, FuncInfo, IPToStateTable);
684 int UnwindHelpOffset = 0;
690 MCSymbol *TryBlockMapXData =
nullptr;
694 Twine(
"$stateUnwindMap$", FuncLinkageName));
698 if (!IPToStateTable.empty())
702 bool VerboseAsm = OS.isVerboseAsm();
703 auto AddComment = [&](
const Twine &Comment) {
705 OS.AddComment(Comment);
723 OS.emitValueToAlignment(4);
724 OS.emitLabel(FuncInfoXData);
726 AddComment(
"MagicNumber");
727 OS.emitInt32(0x19930522);
729 AddComment(
"MaxState");
732 AddComment(
"UnwindMap");
733 OS.emitValue(create32bitRef(UnwindMapXData), 4);
735 AddComment(
"NumTryBlocks");
738 AddComment(
"TryBlockMap");
739 OS.emitValue(create32bitRef(TryBlockMapXData), 4);
741 AddComment(
"IPMapEntries");
742 OS.emitInt32(IPToStateTable.size());
744 AddComment(
"IPToStateXData");
745 OS.emitValue(create32bitRef(IPToStateXData), 4);
748 AddComment(
"UnwindHelp");
749 OS.emitInt32(UnwindHelpOffset);
752 AddComment(
"ESTypeList");
755 AddComment(
"EHFlags");
762 if (UnwindMapXData) {
763 OS.emitLabel(UnwindMapXData);
767 AddComment(
"ToState");
770 AddComment(
"Action");
771 OS.emitValue(create32bitRef(CleanupSym), 4);
782 if (TryBlockMapXData) {
783 OS.emitLabel(TryBlockMapXData);
788 MCSymbol *HandlerMapXData =
nullptr;
794 .
concat(FuncLinkageName));
802 "bad trymap interval");
804 AddComment(
"TryLow");
805 OS.emitInt32(TBME.
TryLow);
807 AddComment(
"TryHigh");
810 AddComment(
"CatchHigh");
813 AddComment(
"NumCatches");
816 AddComment(
"HandlerArray");
817 OS.emitValue(create32bitRef(HandlerMapXData), 4);
821 unsigned ParentFrameOffset = 0;
822 if (shouldEmitPersonality) {
829 MCSymbol *HandlerMapXData = HandlerMaps[
I];
830 if (!HandlerMapXData)
839 OS.emitLabel(HandlerMapXData);
844 const MCExpr *FrameAllocOffsetRef =
nullptr;
847 assert(
Offset != 0 &&
"Illegal offset for catch object!");
856 AddComment(
"Adjectives");
862 AddComment(
"CatchObjOffset");
863 OS.emitValue(FrameAllocOffsetRef, 4);
865 AddComment(
"Handler");
866 OS.emitValue(create32bitRef(HandlerSym), 4);
868 if (shouldEmitPersonality) {
869 AddComment(
"ParentFrameOffset");
870 OS.emitInt32(ParentFrameOffset);
880 if (IPToStateXData) {
881 OS.emitLabel(IPToStateXData);
882 for (
auto &IPStatePair : IPToStateTable) {
884 OS.emitValue(IPStatePair.first, 4);
885 AddComment(
"ToState");
886 OS.emitInt32(IPStatePair.second);
891 void WinException::computeIP2StateTable(
896 FuncletEnd = MF->
begin(),
898 FuncletStart != End; FuncletStart = FuncletEnd) {
900 while (++FuncletEnd != End) {
901 if (FuncletEnd->isEHFuncletEntry()) {
909 if (FuncletStart->isCleanupFuncletEntry())
914 if (FuncletStart == MF->
begin()) {
915 BaseState = NullState;
919 cast<FuncletPadInst>(FuncletStart->getBasicBlock()->getFirstNonPHI());
924 assert(StartLabel &&
"need local function start label");
925 IPToStateTable.push_back(
926 std::make_pair(create32bitRef(StartLabel), BaseState));
928 for (
const auto &StateChange : InvokeStateChangeIterator::range(
929 FuncInfo, FuncletStart, FuncletEnd, BaseState)) {
934 const MCSymbol *ChangeLabel = StateChange.NewStartLabel;
936 ChangeLabel = StateChange.PreviousEndLabel;
938 IPToStateTable.push_back(
939 std::make_pair(getLabel(ChangeLabel), StateChange.NewState));
945 void WinException::emitEHRegistrationOffsetLabel(
const WinEHFuncInfo &FuncInfo,
979 auto AddComment = [&](
const Twine &Comment) {
985 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
992 const auto *Per = cast<Function>(
F.getPersonalityFn()->stripPointerCasts());
995 if (PerName ==
"_except_handler4") {
1018 int GSCookieOffset = -2;
1030 int EHCookieOffset = 9999;
1039 AddComment(
"GSCookieOffset");
1041 AddComment(
"GSCookieXOROffset");
1043 AddComment(
"EHCookieOffset");
1045 AddComment(
"EHCookieXOROffset");
1058 AddComment(
"ToState");
1060 AddComment(UME.
IsFinally ?
"Null" :
"FilterFunction");
1062 AddComment(UME.
IsFinally ?
"FinallyFunclet" :
"ExceptionHandler");
1063 OS.
emitValue(create32bitRef(ExceptOrFinally), 4);
1069 while (State != -1) {
1080 while (LeftRank < RightRank) {
1085 while (RightRank < LeftRank) {
1119 assert(NumStates > 0 &&
"Don't need exception table!");
1121 for (
int State = 0; State < NumStates; ++State) {
1124 HandlerStates[HandlerBlock] = State;
1129 "ill-formed state numbering");
1132 HandlerStates[&MF->
front()] = NullState;
1157 std::unique_ptr<MCSymbol *[]> EndSymbolMap(
new MCSymbol *[NumStates]);
1162 FuncletEnd = MF->
begin(),
1164 FuncletStart != End; FuncletStart = FuncletEnd) {
1165 int FuncletState = HandlerStates[&*FuncletStart];
1168 while (++FuncletEnd != End) {
1169 if (FuncletEnd->isEHFuncletEntry()) {
1176 OS.
emitValue(getOffset(EndSymbol, FuncBeginSym), 4);
1177 if (FuncletState != NullState) {
1179 EndSymbolMap[FuncletState] = EndSymbol;
1184 const MCSymbol *CurrentStartLabel =
nullptr;
1185 int CurrentState = NullState;
1187 for (
const auto &StateChange :
1188 InvokeStateChangeIterator::range(FuncInfo, FuncletStart, FuncletEnd)) {
1190 int StillPendingState =
1192 while (CurrentState != StillPendingState) {
1193 assert(CurrentState != NullState &&
1194 "Failed to find still-pending state!");
1196 Clauses.
push_back({CurrentStartLabel, StateChange.PreviousEndLabel,
1197 CurrentState, FuncletState});
1199 CurrentState = FuncInfo.
ClrEHUnwindMap[CurrentState].TryParentState;
1202 if (HandlerStack.
back().second == CurrentState)
1206 if (StateChange.NewState != CurrentState) {
1210 for (
int EnteredState = StateChange.NewState;
1211 EnteredState != CurrentState;
1214 int &MinEnclosingState = MinClauseMap[EnteredState];
1215 if (FuncletState < MinEnclosingState)
1216 MinEnclosingState = FuncletState;
1220 HandlerStack.
emplace_back(CurrentStartLabel, CurrentState);
1221 CurrentStartLabel = StateChange.NewStartLabel;
1222 CurrentState = StateChange.NewState;
1230 for (ClrClause &
Clause : Clauses) {
1279 const MCExpr *ClauseBegin =
1280 getOffsetPlusOne(
Clause.StartLabel, FuncBeginSym);
1281 const MCExpr *ClauseEnd = getOffsetPlusOne(
Clause.EndLabel, FuncBeginSym);
1286 const MCExpr *HandlerBegin = getOffset(BeginSym, FuncBeginSym);
1288 const MCExpr *HandlerEnd = getOffset(EndSym, FuncBeginSym);
1291 switch (Entry.HandlerType) {
1305 if (
Clause.EnclosingState != MinClauseMap[
Clause.State]) {
detail::concat_range< ValueT, RangeTs... > concat(RangeTs &&... Ranges)
Concatenated range across two or more ranges.
MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
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
DenseMap< MCSymbol *, std::pair< int, MCSymbol * > > LabelToStateMap
StackOffset is a class to represent an offset with 2 dimensions, named fixed and scalable,...
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.
virtual StackOffset getNonLocalFrameIndexReference(const MachineFunction &MF, int FI) const
getNonLocalFrameIndexReference - This method returns the offset used to reference a frame index locat...
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
LLVM_NODISCARD bool empty() const
SmallVector< SEHUnwindMapEntry, 4 > SEHUnwindMap
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
MCSymbol * getOrCreateParentFrameOffsetSymbol(StringRef FuncName)
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 ...
MachineFunction * MF
The current machine function.
T get() const
Returns the value of the specified pointer type.
Function & getFunction()
Return the LLVM function that this machine code represents.
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, otherwise returns null.
void endModule() override
Emit all exception information that should come after the content.
Emits exception handling directives.
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
static StackOffset getFixed(ScalarTy Fixed)
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.
void emitInt32(uint64_t Value)
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.
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
void tidyLandingPads(DenseMap< MCSymbol *, uintptr_t > *LPMap=nullptr, bool TidyIfNoBeginLabels=true)
Remap landing pad labels and remove any deleted landing pads.
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
Similar to CxxUnwindMapEntry, but supports SEH filters.
SmallVector< ClrEHUnwindMapEntry, 4 > ClrEHUnwindMap
Streaming machine code generation interface.
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
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...
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.
ScalarTy getFixed() const
const Triple & getTargetTriple() const
Register getStackPointerRegisterToSaveRestore() const
If a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save...
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)
union llvm::WinEHHandlerType::@216 CatchObj
The CatchObj starts out life as an LLVM alloca and is eventually turned frame index.
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
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',...
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.
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.
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
APInt operator *(APInt a, uint64_t RHS)
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
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
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.
LLVM Value Representation.
void emitAlignment(Align Alignment, const GlobalObject *GV=nullptr) const
Emit an alignment directive to the specified power of two boundary.
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.
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)
MachineBasicBlock MachineBasicBlock::iterator MBBI
Wrapper class representing virtual and physical registers.
This file describes how to lower LLVM code to machine code.
A function that returns a base type.