33 if (!
Asm->isPositionIndependent()) {
34 for (
const char *SymName : {
"__cpp_exception",
"__c_longjmp"}) {
37 if (
Asm->OutContext.lookupSymbol(NameStr)) {
38 MCSymbol *ExceptionSym =
Asm->GetExternalSymbolSymbol(SymName);
39 Asm->OutStreamer->emitLabel(ExceptionSym);
46 bool ShouldEmitExceptionTable =
false;
49 ShouldEmitExceptionTable =
true;
53 if (!ShouldEmitExceptionTable)
56 assert(LSDALabel &&
".GCC_exception_table has not been emitted!");
61 MCSymbol *LSDAEndLabel =
Asm->createTempSymbol(
"GCC_except_table_end");
62 Asm->OutStreamer->emitLabel(LSDAEndLabel);
67 Asm->OutStreamer->emitELFSize(LSDALabel, SizeExp);
84 for (
unsigned I = 0,
N = LandingPads.
size();
I <
N; ++
I) {
94 if (CallSites.
size() < LPadIndex + 1)
95 CallSites.
resize(LPadIndex + 1);
96 CallSites[LPadIndex] = Site;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
AsmPrinter * Asm
Target of directive emission.
MCSymbol * emitExceptionTable()
Emit landing pads and actions.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
unsigned getWasmLandingPadIndex(const MachineBasicBlock *LPad) const
Get the index in wasm EH for a given landing pad.
const std::vector< LandingPadInfo > & getLandingPads() const
Return a reference to the landing pad info for the current function.
bool hasWasmLandingPadIndex(const MachineBasicBlock *LPad) const
Returns true if the landing pad has an associate index in wasm EH.
LLVM_ABI void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void computeCallSiteTable(SmallVectorImpl< CallSiteEntry > &CallSites, SmallVectorImpl< CallSiteRange > &CallSiteRanges, const SmallVectorImpl< const LandingPadInfo * > &LandingPads, const SmallVectorImpl< unsigned > &FirstActions) override
Compute the call-site table and the call-site ranges.
void endModule() override
Emit all sections that should come after the content.
void endFunction(const MachineFunction *MF) override
Gather post-function debug information.
This is an optimization pass for GlobalISel generic memory operations.
Structure describing an entry in the call-site table.
This structure is used to retain landing pad info for the current function.