56 if (
F.hasFnAttribute(
"safeseh"))
61 shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA =
false;
85 shouldEmitPersonality =
86 forceEmitPersonality || ((hasLandingPads || hasEHFunclets) &&
90 shouldEmitLSDA = shouldEmitPersonality &&
103 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
105 shouldEmitLSDA = hasEHFunclets;
106 shouldEmitPersonality =
false;
116 if (!shouldEmitPersonality && !shouldEmitMoves && !shouldEmitLSDA)
138 if (shouldEmitPersonality || shouldEmitLSDA) {
149 emitCSpecificHandlerTable(MF);
151 emitExceptHandlerTable(MF);
153 emitCXXFrameHandler3Table(MF);
155 emitCLRExceptionTable(MF);
178 return Ctx.getOrCreateSymbol(
"?" + HandlerPrefix +
"$" +
180 FuncLinkageName +
"@4HA");
185 CurrentFuncletEntry = &MBB;
209 if (shouldEmitMoves || shouldEmitPersonality) {
210 CurrentFuncletTextSection =
Asm->
OutStreamer->getCurrentSectionOnly();
214 if (shouldEmitPersonality) {
236 if (!CurrentFuncletEntry)
240 if (shouldEmitMoves || shouldEmitPersonality) {
266 Twine(
"$cppxdata$", FuncLinkageName));
272 emitCSpecificHandlerTable(MF);
283 CurrentFuncletEntry =
nullptr;
317 const MCExpr *WinException::getOffsetPlusOne(
const MCSymbol *OffsetOf,
324 int WinException::getFrameIndexOffset(
int FrameIndex,
350 const int NullState = -1;
352 struct InvokeStateChange {
374 class InvokeStateChangeIterator {
380 : EHInfo(EHInfo), MFI(MFI), MFE(MFE), MBBI(MBBI), BaseState(BaseState) {
381 LastStateChange.PreviousEndLabel =
nullptr;
382 LastStateChange.NewStartLabel =
nullptr;
383 LastStateChange.NewState = BaseState;
394 auto BlockBegin = Begin->begin();
395 auto BlockEnd = std::prev(End)->end();
397 InvokeStateChangeIterator(EHInfo, Begin, End, BlockBegin, BaseState),
398 InvokeStateChangeIterator(EHInfo, End, End, BlockEnd, BaseState));
402 bool operator==(
const InvokeStateChangeIterator &
O)
const {
403 assert(BaseState == O.BaseState);
414 return CurrentEndLabel == O.CurrentEndLabel;
417 bool operator!=(
const InvokeStateChangeIterator &O)
const {
420 InvokeStateChange &
operator*() {
return LastStateChange; }
421 InvokeStateChange *operator->() {
return &LastStateChange; }
422 InvokeStateChangeIterator &operator++() {
return scan(); }
425 InvokeStateChangeIterator &
scan();
428 const MCSymbol *CurrentEndLabel =
nullptr;
432 InvokeStateChange LastStateChange;
433 bool VisitingInvoke =
false;
440 bool IsNewBlock =
false;
441 for (; MFI != MFE; ++MFI, IsNewBlock =
true) {
444 for (
auto MBBE = MFI->end(); MBBI != MBBE; ++MBBI) {
446 if (!VisitingInvoke && LastStateChange.NewState != BaseState &&
451 LastStateChange.PreviousEndLabel = CurrentEndLabel;
452 LastStateChange.NewStartLabel =
nullptr;
453 LastStateChange.NewState = BaseState;
454 CurrentEndLabel =
nullptr;
464 if (Label == CurrentEndLabel) {
465 VisitingInvoke =
false;
468 auto InvokeMapIter = EHInfo.LabelToStateMap.find(Label);
470 if (InvokeMapIter == EHInfo.LabelToStateMap.end())
472 auto &StateAndEnd = InvokeMapIter->second;
473 int NewState = StateAndEnd.first;
476 VisitingInvoke =
true;
477 if (NewState == LastStateChange.NewState) {
480 CurrentEndLabel = StateAndEnd.second;
484 LastStateChange.PreviousEndLabel = CurrentEndLabel;
485 LastStateChange.NewStartLabel = Label;
486 LastStateChange.NewState = NewState;
488 CurrentEndLabel = StateAndEnd.second;
495 if (LastStateChange.NewState != BaseState) {
497 LastStateChange.PreviousEndLabel = CurrentEndLabel;
498 LastStateChange.NewStartLabel =
nullptr;
499 LastStateChange.NewState = BaseState;
501 assert(CurrentEndLabel !=
nullptr);
505 CurrentEndLabel =
nullptr;
537 void WinException::emitCSpecificHandlerTable(
const MachineFunction *MF) {
542 bool VerboseAsm = OS.isVerboseAsm();
543 auto AddComment = [&](
const Twine &Comment) {
545 OS.AddComment(Comment);
566 const MCExpr *LabelDiff = getOffset(TableEnd, TableBegin);
569 AddComment(
"Number of call sites");
570 OS.EmitValue(EntryCount, 4);
572 OS.EmitLabel(TableBegin);
581 const MCSymbol *LastStartLabel =
nullptr;
582 int LastEHState = -1;
587 while (Stop != End && !Stop->isEHFuncletEntry())
589 for (
const auto &StateChange :
590 InvokeStateChangeIterator::range(FuncInfo, MF->
begin(), Stop)) {
593 if (LastEHState != -1)
594 emitSEHActionsForRange(FuncInfo, LastStartLabel,
595 StateChange.PreviousEndLabel, LastEHState);
596 LastStartLabel = StateChange.NewStartLabel;
597 LastEHState = StateChange.NewState;
600 OS.EmitLabel(TableEnd);
603 void WinException::emitSEHActionsForRange(
const WinEHFuncInfo &FuncInfo,
605 const MCSymbol *EndLabel,
int State) {
608 bool VerboseAsm = OS.isVerboseAsm();
609 auto AddComment = [&](
const Twine &Comment) {
611 OS.AddComment(Comment);
614 assert(BeginLabel && EndLabel);
615 while (State != -1) {
617 const MCExpr *FilterOrFinally;
618 const MCExpr *ExceptOrNull;
626 FilterOrFinally = UME.
Filter ? create32bitRef(UME.
Filter)
628 ExceptOrNull = create32bitRef(Handler->getSymbol());
631 AddComment(
"LabelStart");
632 OS.EmitValue(getLabel(BeginLabel), 4);
633 AddComment(
"LabelEnd");
634 OS.EmitValue(getLabel(EndLabel), 4);
635 AddComment(UME.
IsFinally ?
"FinallyFunclet" : UME.
Filter ?
"FilterFunction" 637 OS.EmitValue(FilterOrFinally, 4);
638 AddComment(UME.
IsFinally ?
"Null" :
"ExceptionHandler");
639 OS.EmitValue(ExceptOrNull, 4);
646 void WinException::emitCXXFrameHandler3Table(
const MachineFunction *MF) {
655 if (shouldEmitPersonality) {
660 computeIP2StateTable(MF, FuncInfo, IPToStateTable);
665 int UnwindHelpOffset = 0;
671 MCSymbol *TryBlockMapXData =
nullptr;
675 Twine(
"$stateUnwindMap$", FuncLinkageName));
679 if (!IPToStateTable.empty())
683 bool VerboseAsm = OS.isVerboseAsm();
684 auto AddComment = [&](
const Twine &Comment) {
686 OS.AddComment(Comment);
704 OS.EmitValueToAlignment(4);
705 OS.EmitLabel(FuncInfoXData);
707 AddComment(
"MagicNumber");
708 OS.EmitIntValue(0x19930522, 4);
710 AddComment(
"MaxState");
713 AddComment(
"UnwindMap");
714 OS.EmitValue(create32bitRef(UnwindMapXData), 4);
716 AddComment(
"NumTryBlocks");
719 AddComment(
"TryBlockMap");
720 OS.EmitValue(create32bitRef(TryBlockMapXData), 4);
722 AddComment(
"IPMapEntries");
723 OS.EmitIntValue(IPToStateTable.size(), 4);
725 AddComment(
"IPToStateXData");
726 OS.EmitValue(create32bitRef(IPToStateXData), 4);
729 AddComment(
"UnwindHelp");
730 OS.EmitIntValue(UnwindHelpOffset, 4);
733 AddComment(
"ESTypeList");
734 OS.EmitIntValue(0, 4);
736 AddComment(
"EHFlags");
737 OS.EmitIntValue(1, 4);
743 if (UnwindMapXData) {
744 OS.EmitLabel(UnwindMapXData);
748 AddComment(
"ToState");
749 OS.EmitIntValue(UME.
ToState, 4);
751 AddComment(
"Action");
752 OS.EmitValue(create32bitRef(CleanupSym), 4);
763 if (TryBlockMapXData) {
764 OS.EmitLabel(TryBlockMapXData);
769 MCSymbol *HandlerMapXData =
nullptr;
775 .
concat(FuncLinkageName));
783 "bad trymap interval");
785 AddComment(
"TryLow");
786 OS.EmitIntValue(TBME.
TryLow, 4);
788 AddComment(
"TryHigh");
789 OS.EmitIntValue(TBME.
TryHigh, 4);
791 AddComment(
"CatchHigh");
794 AddComment(
"NumCatches");
797 AddComment(
"HandlerArray");
798 OS.EmitValue(create32bitRef(HandlerMapXData), 4);
802 unsigned ParentFrameOffset = 0;
803 if (shouldEmitPersonality) {
810 MCSymbol *HandlerMapXData = HandlerMaps[
I];
811 if (!HandlerMapXData)
820 OS.EmitLabel(HandlerMapXData);
825 const MCExpr *FrameAllocOffsetRef =
nullptr;
828 assert(Offset != 0 &&
"Illegal offset for catch object!");
837 AddComment(
"Adjectives");
843 AddComment(
"CatchObjOffset");
844 OS.EmitValue(FrameAllocOffsetRef, 4);
846 AddComment(
"Handler");
847 OS.EmitValue(create32bitRef(HandlerSym), 4);
849 if (shouldEmitPersonality) {
850 AddComment(
"ParentFrameOffset");
851 OS.EmitIntValue(ParentFrameOffset, 4);
861 if (IPToStateXData) {
862 OS.EmitLabel(IPToStateXData);
863 for (
auto &IPStatePair : IPToStateTable) {
865 OS.EmitValue(IPStatePair.first, 4);
866 AddComment(
"ToState");
867 OS.EmitIntValue(IPStatePair.second, 4);
872 void WinException::computeIP2StateTable(
877 FuncletEnd = MF->
begin(),
879 FuncletStart != End; FuncletStart = FuncletEnd) {
881 while (++FuncletEnd != End) {
882 if (FuncletEnd->isEHFuncletEntry()) {
890 if (FuncletStart->isCleanupFuncletEntry())
895 if (FuncletStart == MF->
begin()) {
896 BaseState = NullState;
900 cast<FuncletPadInst>(FuncletStart->getBasicBlock()->getFirstNonPHI());
905 assert(StartLabel &&
"need local function start label");
906 IPToStateTable.push_back(
907 std::make_pair(create32bitRef(StartLabel), BaseState));
909 for (
const auto &StateChange : InvokeStateChangeIterator::range(
910 FuncInfo, FuncletStart, FuncletEnd, BaseState)) {
915 const MCSymbol *ChangeLabel = StateChange.NewStartLabel;
917 ChangeLabel = StateChange.PreviousEndLabel;
919 IPToStateTable.push_back(
920 std::make_pair(getLabel(ChangeLabel), StateChange.NewState));
926 void WinException::emitEHRegistrationOffsetLabel(
const WinEHFuncInfo &FuncInfo,
964 auto AddComment = [&](
const Twine &Comment) {
970 emitEHRegistrationOffsetLabel(FuncInfo, FLinkageName);
981 if (PerName ==
"_except_handler4") {
1004 int GSCookieOffset = -2;
1015 int EHCookieOffset = 9999;
1023 AddComment(
"GSCookieOffset");
1025 AddComment(
"GSCookieXOROffset");
1027 AddComment(
"EHCookieOffset");
1029 AddComment(
"EHCookieXOROffset");
1042 AddComment(
"ToState");
1044 AddComment(UME.
IsFinally ?
"Null" :
"FilterFunction");
1046 AddComment(UME.
IsFinally ?
"FinallyFunclet" :
"ExceptionHandler");
1047 OS.
EmitValue(create32bitRef(ExceptOrFinally), 4);
1053 while (State != -1) {
1064 while (LeftRank < RightRank) {
1069 while (RightRank < LeftRank) {
1074 while (Left != Right) {
1103 assert(NumStates > 0 &&
"Don't need exception table!");
1105 for (
int State = 0; State < NumStates; ++State) {
1108 HandlerStates[HandlerBlock] = State;
1113 "ill-formed state numbering");
1116 HandlerStates[&MF->
front()] = NullState;
1141 std::unique_ptr<MCSymbol *[]> EndSymbolMap(
new MCSymbol *[NumStates]);
1146 FuncletEnd = MF->
begin(),
1148 FuncletStart != End; FuncletStart = FuncletEnd) {
1149 int FuncletState = HandlerStates[&*FuncletStart];
1152 while (++FuncletEnd != End) {
1153 if (FuncletEnd->isEHFuncletEntry()) {
1160 OS.
EmitValue(getOffset(EndSymbol, FuncBeginSym), 4);
1161 if (FuncletState != NullState) {
1163 EndSymbolMap[FuncletState] = EndSymbol;
1168 const MCSymbol *CurrentStartLabel =
nullptr;
1169 int CurrentState = NullState;
1171 for (
const auto &StateChange :
1172 InvokeStateChangeIterator::range(FuncInfo, FuncletStart, FuncletEnd)) {
1174 int StillPendingState =
1176 while (CurrentState != StillPendingState) {
1177 assert(CurrentState != NullState &&
1178 "Failed to find still-pending state!");
1180 Clauses.
push_back({CurrentStartLabel, StateChange.PreviousEndLabel,
1181 CurrentState, FuncletState});
1183 CurrentState = FuncInfo.
ClrEHUnwindMap[CurrentState].TryParentState;
1186 if (HandlerStack.
back().second == CurrentState)
1190 if (StateChange.NewState != CurrentState) {
1194 for (
int EnteredState = StateChange.NewState;
1195 EnteredState != CurrentState;
1198 int &MinEnclosingState = MinClauseMap[EnteredState];
1199 if (FuncletState < MinEnclosingState)
1200 MinEnclosingState = FuncletState;
1204 HandlerStack.
emplace_back(CurrentStartLabel, CurrentState);
1205 CurrentStartLabel = StateChange.NewStartLabel;
1206 CurrentState = StateChange.NewState;
1214 for (ClrClause &Clause : Clauses) {
1263 const MCExpr *ClauseBegin =
1264 getOffsetPlusOne(Clause.StartLabel, FuncBeginSym);
1265 const MCExpr *ClauseEnd = getOffsetPlusOne(Clause.EndLabel, FuncBeginSym);
1270 const MCExpr *HandlerBegin = getOffset(BeginSym, FuncBeginSym);
1271 MCSymbol *EndSym = EndSymbolMap[Clause.State];
1272 const MCExpr *HandlerEnd = getOffset(EndSym, FuncBeginSym);
1289 if (Clause.EnclosingState != MinClauseMap[Clause.State]) {
1292 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...
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)
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 ...
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
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 ...
union llvm::WinEHHandlerType::@189 CatchObj
The CatchObj starts out life as an LLVM alloca and is eventually turned frame index.
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...
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.
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...
unsigned getLSDAEncoding() const
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
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())
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.
const Triple & getTargetTriple() 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...
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.
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)
T get() const
Returns the value of the specified pointer type.
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 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.
A function that returns a base type.