14#include "mlir/Support/LLVM.h"
68struct GetParamRef :
public StmtVisitor<GetParamRef> {
73 assert(
expr ==
nullptr &&
"multilple declref in param move");
76 void VisitStmt(
Stmt *s) {
87struct ParamReferenceReplacerRAII {
92 : localDeclMap(localDeclMap) {}
94 void addCopy(
const DeclStmt *pm) {
98 const VarDecl *vd =
static_cast<const VarDecl *
>(pm->
getSingleDecl());
99 const Expr *initExpr = vd->
getInit();
101 visitor.Visit(
const_cast<Expr *
>(initExpr));
102 assert(visitor.expr);
103 DeclRefExpr *dreOrig = visitor.expr;
106 auto it = localDeclMap.find(pd);
107 assert(it != localDeclMap.end() &&
"parameter is not found");
108 savedLocals.insert({pd, it->second});
110 auto copyIt = localDeclMap.find(vd);
111 assert(copyIt != localDeclMap.end() &&
"parameter copy is not found");
112 it->second = copyIt->getSecond();
115 ~ParamReferenceReplacerRAII() {
116 for (
auto &&savedLocal : savedLocals) {
117 localDeclMap.insert({savedLocal.first, savedLocal.second});
133 cir::CoroIdOp coroId,
134 CallExpr const *coroIdExpr =
nullptr) {
138 cgf.
cgm.
error(coroIdExpr->getBeginLoc(),
139 "only one __builtin_coro_id can be used in a function");
141 cgf.
cgm.
error(coroIdExpr->getBeginLoc(),
142 "__builtin_coro_id shall not be used in a C++ coroutine");
144 llvm_unreachable(
"EmitCoroutineBodyStatement called twice?");
154static mlir::LogicalResult
164 if (cgf.
emitStmt(body,
true).failed())
165 return mlir::failure();
176 const bool canFallthrough = !currLexScope->
hasCoreturn();
179 if (cgf.
emitStmt(onFallthrough,
true).failed())
180 return mlir::failure();
182 return mlir::success();
192 auto coroId = cir::CoroIdOp::create(
cgm.getBuilder(), loc, args);
200 cgm.error(e->
getBeginLoc(),
"this builtin expect that __builtin_coro_id has"
201 " been used earlier in this function");
205 return cir::CoroAllocOp::create(
206 cgm.getBuilder(), loc,
207 mlir::ValueRange{curCoro.data->coroId.getResult()});
214 cgm.error(e->
getBeginLoc(),
"this builtin expect that __builtin_coro_id has"
215 " been used earlier in this function");
219 args.push_back(
curCoro.data->coroId.getResult());
223 auto coroBegin = cir::CoroBeginOp::create(
cgm.getBuilder(), loc, args);
224 curCoro.data->coroBegin = coroBegin;
235 args.push_back(cir::TokenNoneOp::create(builder, loc));
236 return cir::CoroEndOp::create(builder, loc, {
cgm.voidTy}, args);
243 cgm.error(e->
getBeginLoc(),
"this builtin expect that __builtin_coro_id has"
244 " been used earlier in this function");
249 cir::CoroFreeOp::create(
cgm.getBuilder(), loc,
250 mlir::ValueRange{curCoro.data->coroId.getResult(),
251 curCoro.data->coroBegin});
253 curCoro.data->lastCoroFree = coroFree;
259 return cir::CoroSizeOp::create(
cgm.getBuilder(), loc,
265 return cir::CoroAlignOp::create(
cgm.getBuilder(), loc,
277 auto coroPromise = cir::CoroPromiseOp::create(
cgm.getBuilder(), loc, args);
283 return cir::CoroDoneOp::create(
cgm.getBuilder(), loc,
289 return cir::CoroResumeOp::create(
cgm.getBuilder(), loc,
296 return cir::CoroDestroyOp::create(
cgm.getBuilder(), loc,
302 return cir::CoroNoopOp::create(
cgm.getBuilder(), loc);
309 args.push_back(cir::TokenNoneOp::create(builder, loc));
312 return cir::CoroSuspendOp::create(
cgm.getBuilder(), loc, args);
315static mlir::LogicalResult
329 ~handlerEmitter()
override =
default;
340 cir::ConstantOp nullPtrCst = builder.getNullPtr(
voidPtrTy, openCurlyLoc);
342 auto fn = mlir::cast<cir::FuncOp>(
curFn);
343 fn.setCoroutine(
true);
347 cir::CoroIdOp coroId = cir::CoroIdOp::create(
348 cgm.getBuilder(), openCurlyLoc,
349 mlir::ValueRange{builder.getUInt32(newAlign, openCurlyLoc), nullPtrCst,
350 nullPtrCst, nullPtrCst});
355 cir::CoroAllocOp coroAlloc = cir::CoroAllocOp::create(
356 cgm.getBuilder(), openCurlyLoc,
357 mlir::ValueRange{curCoro.data->coroId.getResult()});
364 openCurlyLoc,
"__coro_frame_addr",
367 mlir::Value storeAddr = coroFrame.
getPointer();
368 builder.CIRBaseBuilderTy::createStore(openCurlyLoc, nullPtrCst, storeAddr);
369 mlir::LogicalResult res = mlir::success();
371 builder, openCurlyLoc, coroAlloc.getResult(),
373 [&](mlir::OpBuilder &b, mlir::Location loc) {
374 mlir::Value allocatedPtr = emitScalarExpr(s.getAllocate());
375 builder.CIRBaseBuilderTy::createStore(loc, allocatedPtr, storeAddr);
377 if (Stmt *retOnAllocFailure = s.getReturnStmtOnAllocFailure()) {
378 mlir::Value isPtrNull = builder.createPtrIsNull(allocatedPtr);
379 assert(!cir::MissingFeatures::emitCondLikelihoodViaExpectIntrinsic());
380 cir::IfOp::create(builder, loc, isPtrNull, false,
381 [&](mlir::OpBuilder &b, mlir::Location loc) {
382 res = emitStmt(retOnAllocFailure,
384 cir::UnreachableOp::create(builder, loc);
387 cir::YieldOp::create(builder, loc);
393 curCoro.
data->coroBegin = cir::CoroBeginOp::create(
396 curCoro.data->coroId.getResult(),
397 cir::LoadOp::create(builder, openCurlyLoc, allocaTy, storeAddr)});
406 assert((paramMoves.size() == 0 || (paramMoves.size() ==
fnArgs.size())) &&
407 "ParamMoves and FnArgs should be the same size for coroutine "
416 for (
auto *pm : paramMoves) {
418 return mlir::failure();
423 auto initialSuspendBuilder = [&]() -> mlir::LogicalResult {
424 if (
emitStmt(s.getPromiseDeclStmt(),
true).failed())
425 return mlir::failure();
440 s.getReturnValue()->getType().getQualifiers(),
443 curCoro.
data->currentAwaitKind = cir::AwaitKind::Init;
444 curCoro.
data->exceptionHandler = s.getExceptionHandler();
446 if (
emitStmt(s.getInitSuspendStmt(),
true).failed())
447 return mlir::failure();
449 cir::YieldOp::create(builder, openCurlyLoc);
450 return mlir::success();
455 auto bodyBuilder = [&]() -> mlir::LogicalResult {
456 curCoro.
data->currentAwaitKind = cir::AwaitKind::User;
476 openCurlyLoc,
curCoro.
data->resumeEHVar.getPointer());
477 mlir::LogicalResult res = mlir::success();
478 cir::IfOp::create(builder, openCurlyLoc, shouldSkip,
480 [&](mlir::OpBuilder &b, mlir::Location loc) {
486 return mlir::failure();
489 return mlir::failure();
493 return mlir::failure();
496 return mlir::success();
501 auto finalSuspendBuilder = [&]() -> mlir::LogicalResult {
510 const bool canFallthrough =
curLexScope->hasCoreturn();
511 const bool hasCoreturns =
curCoro.data->coreturnCount > 0;
512 if (canFallthrough || hasCoreturns) {
513 curCoro.data->currentAwaitKind = cir::AwaitKind::Final;
514 if (
emitStmt(s.getFinalSuspendStmt(),
true)
516 return mlir::failure();
518 cir::YieldOp::create(builder, openCurlyLoc);
519 return mlir::success();
523 auto destroyBuilder = [&]() -> mlir::LogicalResult {
524 Stmt *deallocate = s.getDeallocate();
525 if (
emitStmt(deallocate,
true).failed()) {
527 "failed to emit coroutine deallocation expression");
528 return mlir::failure();
531 cir::CoroFreeOp coroFree =
curCoro.data->lastCoroFree;
535 "Deallocation expression does not refer to coro.free");
536 return mlir::failure();
539 mlir::OpBuilder::InsertionGuard guard(builder);
540 builder.setInsertionPointAfter(coroFree);
541 mlir::Value isPtrNotNull =
542 builder.createPtrIsNotNull(coroFree.getResult());
544 llvm::SmallVector<mlir::Operation *> opsToMove;
545 mlir::Block *block = builder.getInsertionBlock();
546 mlir::Block::iterator it(isPtrNotNull.getDefiningOp());
548 for (++it; it != block->end(); ++it)
549 opsToMove.push_back(&*it);
551 auto ifOp = cir::IfOp::create(
554 [&](mlir::OpBuilder &builder, mlir::Location loc) {
555 cir::YieldOp::create(builder, loc);
558 mlir::Operation *yieldOp = ifOp.getThenRegion().back().getTerminator();
559 for (
auto *op : opsToMove)
560 op->moveBefore(yieldOp);
563 cir::YieldOp::create(builder, openCurlyLoc);
564 return mlir::success();
569 auto exitBuilder = [&]() {
570 cir::ConstantOp nullHandler =
571 builder.getNullPtr(builder.getVoidPtrTy(), openCurlyLoc);
572 cir::ConstantOp noUnwind = builder.getBool(
false, openCurlyLoc);
573 auto tkNone = cir::TokenNoneOp::create(builder, openCurlyLoc);
574 cir::CoroEndOp::create(builder, openCurlyLoc, nullHandler, noUnwind,
577 if (
auto *ret = cast_or_null<ReturnStmt>(s.getReturnStmt())) {
580 Expr *previousRetValue = ret->getRetValue();
581 ret->setRetValue(
nullptr);
583 return mlir::failure();
584 mlir::Block *block = builder.getInsertionBlock();
590 ret->setRetValue(previousRetValue);
592 cir::ReturnOp::create(builder, openCurlyLoc);
595 return mlir::success();
598 cir::CoroutineOp coro = cir::CoroutineOp::create(
599 builder, openCurlyLoc,
601 [&](mlir::OpBuilder &b, mlir::Location loc) {
602 if (initialSuspendBuilder().failed())
603 res = mlir::failure();
606 [&](mlir::OpBuilder &b, mlir::Location loc) {
607 if (bodyBuilder().failed())
608 res = mlir::failure();
611 [&](mlir::OpBuilder &b, mlir::Location loc) {
612 if (finalSuspendBuilder().failed())
613 res = mlir::failure();
616 [&](mlir::OpBuilder &b, mlir::Location loc) {
617 if (destroyBuilder().failed())
618 res = mlir::failure();
621 [&](mlir::OpBuilder &b, mlir::Location loc) {
622 if (exitBuilder().failed())
623 res = mlir::failure();
626 if (coro && !coro.getBody().empty()) {
627 mlir::Block &lastBlock = coro.getBody().back();
628 mlir::Block *prevBlock = lastBlock.getPrevNode();
629 if (lastBlock.empty() && lastBlock.hasNoPredecessors() && prevBlock &&
632 }
else if (!lastBlock.mightHaveTerminator()) {
633 mlir::OpBuilder::InsertionGuard guard(builder);
634 builder.setInsertionPointToEnd(&lastBlock);
635 cir::YieldOp::create(builder, openCurlyLoc);
652 if (
const auto *ce = dyn_cast<CallExpr>(s)) {
659 if (
const auto *te = dyn_cast<CXXBindTemporaryExpr>(s))
663 return llvm::any_of(s->
children(), [](
const Stmt *child) {
664 return child && stmtCanThrow(child);
685struct LValueOrRValue {
701 mlir::Block *scopeParentBlock,
702 mlir::Value &tmpResumeRValAddr,
bool forLValue) {
703 [[maybe_unused]] mlir::LogicalResult awaitBuild = mlir::success();
704 LValueOrRValue awaitRes;
720 resultBind = dyn_cast<CXXBindTemporaryExpr>(s.
getResumeExpr());
733 [[maybe_unused]] cir::AwaitOp awaitOp = cir::AwaitOp::create(
736 [&](mlir::OpBuilder &b, mlir::Location loc) {
737 Expr *condExpr = s.getReadyExpr()->IgnoreParens();
738 builder.createCondition(cgf.evaluateExprAsBool(condExpr));
741 [&](mlir::OpBuilder &b, mlir::Location loc) {
746 switch (s.getSuspendReturnType()) {
747 case CoroutineSuspendExpr::SuspendReturnType::SuspendBool: {
748 mlir::Value suspendRet = cgf.evaluateExprAsBool(s.getSuspendExpr());
750 cir::CoroSuspendPoint::create(builder, loc, suspendRet);
753 case CoroutineSuspendExpr::SuspendReturnType::SuspendVoid:
754 cgf.emitScalarExpr(s.getSuspendExpr());
756 cir::CoroSuspendPoint::create(builder, loc);
758 case CoroutineSuspendExpr::SuspendReturnType::SuspendHandle:
759 cgf.cgm.errorNYI(s.getSourceRange(),
760 "await_suspend returning handle");
761 cir::CoroSuspendPoint::create(builder, loc);
766 [&](mlir::OpBuilder &b, mlir::Location loc) {
778 ASTContext &ctx = cgf.getContext();
779 SourceLocation resumeLoc = s.getResumeExpr()->getExprLoc();
780 mlir::Location mlirLoc = cgf.getLoc(resumeLoc);
781 coro.resumeEHVar = cgf.createTempAlloca(
784 builder.createFlagStore(mlirLoc,
false,
785 coro.resumeEHVar.getPointer());
787 CXXCatchStmt catchStmt(resumeLoc,
788 nullptr, coro.exceptionHandler);
791 resumeLoc, resumeLoc);
792 CXXTryStmt *tryStmt =
795 struct resumeEmitter final : CIRGenFunction::cxxTryBodyEmitter {
796 const CXXTryStmt &tryStmt;
798 mlir::Value resumeEHVar;
799 resumeEmitter(
const CXXTryStmt &tryStmt, mlir::Location loc,
801 : tryStmt(tryStmt), loc(loc),
802 resumeEHVar(resumeEHVar.getPointer()) {}
804 mlir::LogicalResult operator()(CIRGenFunction &cgf)
override {
805 CIRGenFunction::RunCleanupsScope resumeCleanups(cgf);
806 mlir::LogicalResult res =
807 cgf.
emitStmt(tryStmt.getTryBlock(),
true);
808 resumeCleanups.forceCleanup();
813 ~resumeEmitter()
override =
default;
814 } emitter{*tryStmt, mlirLoc, coro.resumeEHVar};
820 }
else if (forLValue) {
823 awaitRes.lv = cgf.
emitLValue(s.getResumeExpr());
826 cgf.
emitAnyExpr(s.getResumeExpr(), aggSlot, ignoreResult);
827 if (!awaitRes.rv.isIgnored()) {
828 RValue rv = awaitRes.rv;
833 "__coawait_resume_rval", value.getType(), loc,
835 builder.getBestAllocaInsertPoint(scopeParentBlock));
837 builder.CIRBaseBuilderTy::createStore(loc, value,
840 assert(rv.
isAggregate() &&
"unexpected rvalue kind");
846 cir::YieldOp::create(builder, loc);
855 aggSlot.getAddress());
857 assert(awaitBuild.succeeded() &&
"Should know how to codegen");
875 [[maybe_unused]] mlir::Value tmpResumeRValAddr;
880 ignoreResult, currEntryBlock, tmpResumeRValAddr,
927 return mlir::failure();
929 cir::CoReturnOp::create(builder, loc);
934 builder.createBlock(builder.getBlock()->getParent());
935 return mlir::success();
static void createCoroData(CIRGenFunction &cgf, CIRGenFunction::CGCoroInfo &curCoro, cir::CoroIdOp coroId, CallExpr const *coroIdExpr=nullptr)
static LValueOrRValue emitSuspendExpression(CIRGenFunction &cgf, CGCoroData &coro, CoroutineSuspendExpr const &s, cir::AwaitKind kind, AggValueSlot aggSlot, bool ignoreResult, mlir::Block *scopeParentBlock, mlir::Value &tmpResumeRValAddr, bool forLValue)
static bool stmtCanThrow(const Stmt *s)
static RValue emitSuspendExpr(CIRGenFunction &cgf, const CoroutineSuspendExpr &e, cir::AwaitKind kind, AggValueSlot aggSlot, bool ignoreResult)
static bool functionCanThrow(const FunctionDecl *d)
static bool isResumeExprInTryCatch(const CGCoroData &coro, cir::AwaitKind kind, const CoroutineSuspendExpr &s)
static mlir::LogicalResult coroutineBodyExceptionHelper(CIRGenFunction &cgf, const CoroutineBodyStmt &s)
static mlir::LogicalResult emitBodyAndFallthrough(CIRGenFunction &cgf, const CoroutineBodyStmt &s, Stmt *body, const CIRGenFunction::LexicalScope *currLexScope)
*collection of selector each with an associated kind and an ordered *collection of selectors A selector has a kind
cir::StoreOp createFlagStore(mlir::Location loc, bool val, mlir::Value dst)
cir::YieldOp createYield(mlir::Location loc, mlir::ValueRange value={})
Create a yield operation.
cir::LoadOp createFlagLoad(mlir::Location loc, mlir::Value addr)
Emit a load from an boolean flag variable.
CharUnits getTypeAlignInChars(QualType T) const
Return the ABI-specified alignment of a (complete) type T, in characters.
mlir::Value getPointer() const
IsDestructed_t isExternallyDestructed() const
void setExternallyDestructed(bool destructed=true)
An RAII object to set (and then clear) a mapping for an OpaqueValueExpr.
Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited.
mlir::Type convertType(clang::QualType t)
mlir::LogicalResult emitCoreturnStmt(const CoreturnStmt &s)
cir::AllocaOp createTempAlloca(mlir::Type ty, mlir::Location loc, const Twine &name="tmp", mlir::Value arraySize=nullptr, bool insertIntoFnEntryBlock=false)
This creates an alloca and inserts it into the entry block if ArraySize is nullptr,...
cir::CoroAllocOp emitCoroAllocBuiltinCall(const CallExpr *e)
llvm::DenseMap< const clang::Decl *, Address > DeclMapTy
LValue emitLValue(const clang::Expr *e)
Emit code to compute a designator that specifies the location of the expression.
cir::CoroNoopOp emitCoroNoopBuiltinCall(const CallExpr *e)
cir::CoroSuspendOp emitCoroSuspendBuiltinCall(const CallExpr *e)
mlir::Location getLoc(clang::SourceLocation srcLoc)
Helpers to convert Clang's SourceLocation to a MLIR Location.
cir::CoroBeginOp emitCoroBeginBuiltinCall(const CallExpr *e)
void emitAnyExprToMem(const Expr *e, Address location, Qualifiers quals, bool isInitializer)
Emits the code necessary to evaluate an arbitrary expression into the given memory location.
RValue emitCoyieldExpr(const CoyieldExpr &e, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
cir::CoroFreeOp emitCoroFreeBuiltin(const CallExpr *e)
mlir::Operation * curFn
The current function or global initializer that is generated code for.
llvm::SmallVector< const ParmVarDecl * > fnArgs
Save Parameter Decl for coroutine.
AggValueSlot createAggTemp(QualType ty, mlir::Location loc, const Twine &name="tmp", Address *alloca=nullptr)
Create a temporary memory object for the given aggregate type.
mlir::Type convertTypeForMem(QualType t)
RValue emitCoroutineFrame()
mlir::Value emitAlloca(llvm::StringRef name, mlir::Type ty, mlir::Location loc, clang::CharUnits alignment, bool insertIntoFnEntryBlock, mlir::Value arraySize=nullptr)
mlir::LogicalResult emitCXXTryStmt(const clang::CXXTryStmt &s, cxxTryBodyEmitter &bodyCallback, bool isFnTryBlock=false)
cir::CoroPromiseOp emitCoroPromiseBuiltinCall(const CallExpr *e)
Address returnValue
The temporary alloca to hold the return value.
cir::CoroDestroyOp emitCoroDestroyBuiltinCall(const CallExpr *e)
cir::CoroEndOp emitCoroEndBuiltinCall(const CallExpr *e)
void emitCXXTemporary(const CXXTemporary *temporary, QualType tempType, Address ptr)
Emits all the code to cause the given temporary to be cleaned up.
mlir::Value emitScalarExpr(const clang::Expr *e, bool ignoreResultAssign=false)
Emit the computation of the specified expression of scalar type.
CIRGenBuilderTy & getBuilder()
DeclMapTy localDeclMap
This keeps track of the CIR allocas or globals for local C declarations.
RValue emitCoawaitExpr(const CoawaitExpr &e, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
RValue emitAnyExpr(const clang::Expr *e, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
Emit code to compute the specified expression which can have any type.
cir::CoroSizeOp emitCoroSizeBuiltinCall(const CallExpr *e)
cir::CoroDoneOp emitCoroDoneBuiltinCall(const CallExpr *e)
cir::CoroResumeOp emitCoroResumeBuiltinCall(const CallExpr *e)
cir::CoroAlignOp emitCoroAlignBuiltinCall(const CallExpr *e)
LexicalScope * curLexScope
cir::CoroIdOp emitCoroIDBuiltinCall(const CallExpr *e)
clang::ASTContext & getContext() const
mlir::LogicalResult emitCoroutineBody(const CoroutineBodyStmt &s)
mlir::LogicalResult emitStmt(const clang::Stmt *s, bool useCurrentScope, llvm::ArrayRef< const Attr * > attrs={})
void emitIgnoredExpr(const clang::Expr *e)
Emit code to compute the specified expression, ignoring the result.
CIRGenBuilderTy & getBuilder()
void error(SourceLocation loc, llvm::StringRef error)
Emit a general error that something can't be done.
This trivial value class is used to represent the result of an expression that is evaluated.
static RValue get(mlir::Value v)
static RValue getComplex(mlir::Value v)
mlir::Value getValue() const
Return the value of this scalar value.
mlir::Value getComplexValue() const
Return the value of this complex value.
static RValue getIgnored()
Represents binding an expression to a temporary.
CXXCatchStmt - This represents a C++ catch block.
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, CompoundStmt *tryBlock, ArrayRef< Stmt * > handlers)
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
SourceLocation getBeginLoc() const
static CharUnits One()
Construct a CharUnits quantity of one.
Represents a 'co_await' expression.
static CompoundStmt * Create(const ASTContext &C, ArrayRef< Stmt * > Stmts, FPOptionsOverride FPFeatures, SourceLocation LB, SourceLocation RB)
Represents a 'co_return' statement in the C++ Coroutines TS.
Expr * getOperand() const
Retrieve the operand of the 'co_return' statement.
Expr * getPromiseCall() const
Retrieve the promise call that results from this 'co_return' statement.
Represents the body of a coroutine.
CompoundStmt * getBody() const
Retrieve the body of the coroutine as written.
Stmt * getFallthroughHandler() const
SourceLocation getBeginLoc() const LLVM_READONLY
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Expr * getResumeExpr() const
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Represents a 'co_yield' expression.
A reference to a declared variable, function, enum, etc.
bool isSingleDecl() const
isSingleDecl - This method returns true if this DeclStmt refers to a single Decl.
const Decl * getSingleDecl() const
This represents one expression.
Represents a function declaration or definition.
Represents a prototype with parameter type info, e.g.
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Stmt - This represents one statement.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
SourceLocation getBeginLoc() const LLVM_READONLY
Exposes information about the current target.
unsigned getNewAlign() const
Return the largest alignment for which a suitably-sized allocation with 'operator new(size_t)' is gua...
unsigned getCharWidth() const
const T * getAs() const
Member-template getAs<specific type>'.
const Expr * getInit() const
Defines the clang::TargetInfo interface.
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
Top level wrappers for InstallAPI frontend operations.
CanQual< Type > CanQualType
Represents a canonical, potentially-qualified type.
bool isa(CodeGen::Address addr)
bool isNoexceptExceptionSpec(ExceptionSpecificationType ESpecType)
U cast(CodeGen::Address addr)
static bool coroOutsideFrameMD()
static bool generateDebugInfo()
cir::AwaitKind currentAwaitKind
CallExpr const * coroIdExpr
cir::CoroFreeOp lastCoroFree
std::unique_ptr< CGCoroData > data
Represents a scope, including function bodies, compound statements, and the substatements of if/while...
mlir::Block * getEntryBlock()
cir::PointerType voidPtrTy
void* in address space 0