15#include "mlir/IR/Location.h"
28 mlir::OpBuilder::InsertPoint ip) {
41 "emitAutoVarDecl: decl escaping by reference");
65 getContext().getBaseElementType(ty)->isObjCObjectPointerType()) &&
79 (
cgm.getCodeGenOpts().MergeAllConstants && !nrvo &&
99 if (
const auto *cxxrd = dyn_cast<CXXRecordDecl>(rd);
100 (cxxrd && !cxxrd->hasTrivialDestructor()) ||
101 rd->isNonTrivialToPrimitiveDestroy())
109 nullptr,
nullptr, ip);
120 cgm.getDataLayout().getAlignment(defaultTy,
false));
123 mlir::Value v = builder.createStackSave(loc, defaultTy);
125 builder.createStore(loc, v, stack);
140 nullptr, builder.saveInsertionPoint());
148 emission.
addr = address;
162 if (constructor->isTrivial() && constructor->isDefaultConstructor() &&
163 !construct->requiresZeroInitialization())
172 mlir::TypedAttr constant) {
173 mlir::Type ty = constant.getType();
204 mlir::Location loc = builder.getUnknownLoc();
212 assert(emission.
variable &&
"emission was not valid!");
228 if (!init &&
type.isNonTrivialToPrimitiveDefaultInitialize() ==
231 "emitAutoVarInit: non-trivial to default initialize");
246 : (d.
getAttr<UninitializedAttr>()
250 auto initializeWhatIsTechnicallyUninitialized = [&](
Address addr) {
251 if (trivialAutoVarInit ==
259 initializeWhatIsTechnicallyUninitialized(addr);
263 mlir::Attribute constant;
272 if (constant && !mlir::isa<cir::ZeroAttr>(constant) &&
273 (trivialAutoVarInit !=
285 initializeWhatIsTechnicallyUninitialized(addr);
293 assert(val &&
"Should have an address");
294 auto allocaOp = val.getDefiningOp<cir::AllocaOp>();
295 assert(allocaOp &&
"Address should come straight out of the alloca");
297 if (!allocaOp.use_empty())
305 auto typedConstant = mlir::dyn_cast<mlir::TypedAttr>(constant);
306 assert(typedConstant &&
"expected typed attribute");
310 assert(init &&
"expected initializer");
314 RValue::get(builder.getConstant(initLoc, typedConstant)), lv);
360 cir::GlobalLinkageKind linkage =
361 cgm.getCIRLinkageVarDefinition(&d,
false);
375 CIRGenFunction::VarDeclContext varDeclCtx{*
this, &d};
385 std::string contextName;
387 if (
auto *cd = dyn_cast<CapturedDecl>(dc))
389 if (
const auto *fd = dyn_cast<FunctionDecl>(dc))
406 cir::GlobalLinkageKind linkage) {
426 if (d.
hasAttr<LoaderUninitializedAttr>() || d.
hasAttr<CUDASharedAttr>())
428 "getOrCreateStaticVarDecl: LoaderUninitializedAttr");
431 mlir::Attribute init = builder.getZeroInitAttr(
convertType(ty));
433 cir::GlobalOp gv = builder.createVersionedGlobal(
437 gv.setInitialValueAttr(init);
438 gv.setAlignment(
getASTContext().getDeclAlign(&d).getAsAlign().value());
474 else if (
const auto *fd = dyn_cast<FunctionDecl>(dc))
493 const VarDecl &d, cir::GlobalOp gv, cir::GetGlobalOp gvAddr) {
495 mlir::TypedAttr init =
514 if (gv.getSymType() != init.getType()) {
515 gv.setSymType(init.getType());
523 gvAddr.getAddr().setType(builder.getPointerTo(init.getType()));
531 gv.setInitialValueAttr(init);
546 cir::GlobalLinkageKind linkage) {
550 cir::GlobalOp globalOp =
cgm.getOrCreateStaticVarDecl(d, linkage);
553 mlir::Value addr = builder.createGetGlobal(globalOp);
554 auto getAddrOp = addr.getDefiningOp<cir::GetGlobalOp>();
555 assert(getAddrOp &&
"expected cir::GetGlobalOp");
569 "emitStaticVarDecl: variably modified type");
573 mlir::Type expectedType = addr.getType();
575 cir::GlobalOp var = globalOp;
583 var.setAlignment(alignment.
getAsAlign().value());
590 if (
cgm.getCodeGenOpts().KeepPersistentStorageVariables)
599 mlir::Value castedAddr =
600 builder.createBitcast(getAddrOp.getAddr(), expectedType);
602 cgm.setStaticLocalDeclAddress(&d, var);
609 LValue lvalue,
bool capturedByInit) {
614 if (capturedByInit) {
623 LValue lvalue,
bool capturedByInit) {
625 if (capturedByInit) {
632 if (
type->isReferenceType()) {
647 "emitExprAsInit: complex type captured by init");
662 llvm_unreachable(
"bad evaluation kind");
667 case Decl::BuiltinTemplate:
668 case Decl::TranslationUnit:
669 case Decl::ExternCContext:
670 case Decl::Namespace:
671 case Decl::UnresolvedUsingTypename:
672 case Decl::ClassTemplateSpecialization:
673 case Decl::ClassTemplatePartialSpecialization:
674 case Decl::VarTemplateSpecialization:
675 case Decl::VarTemplatePartialSpecialization:
676 case Decl::TemplateTypeParm:
677 case Decl::UnresolvedUsingValue:
678 case Decl::NonTypeTemplateParm:
679 case Decl::CXXDeductionGuide:
680 case Decl::CXXMethod:
681 case Decl::CXXConstructor:
682 case Decl::CXXDestructor:
683 case Decl::CXXConversion:
685 case Decl::MSProperty:
686 case Decl::IndirectField:
688 case Decl::ObjCAtDefsField:
690 case Decl::ImplicitParam:
691 case Decl::ClassTemplate:
692 case Decl::VarTemplate:
693 case Decl::FunctionTemplate:
694 case Decl::TypeAliasTemplate:
695 case Decl::TemplateTemplateParm:
696 case Decl::ObjCMethod:
697 case Decl::ObjCCategory:
698 case Decl::ObjCProtocol:
699 case Decl::ObjCInterface:
700 case Decl::ObjCCategoryImpl:
701 case Decl::ObjCImplementation:
702 case Decl::ObjCProperty:
703 case Decl::ObjCCompatibleAlias:
704 case Decl::PragmaComment:
705 case Decl::PragmaDetectMismatch:
706 case Decl::AccessSpec:
707 case Decl::LinkageSpec:
709 case Decl::ObjCPropertyImpl:
710 case Decl::FileScopeAsm:
712 case Decl::FriendTemplate:
714 case Decl::OutlinedFunction:
716 case Decl::UsingShadow:
717 case Decl::ConstructorUsingShadow:
718 case Decl::ObjCTypeParam:
720 case Decl::UnresolvedUsingIfExists:
721 case Decl::HLSLBuffer:
722 case Decl::HLSLRootSignature:
723 llvm_unreachable(
"Declaration should not be in declstmts!");
726 case Decl::EnumConstant:
727 case Decl::StaticAssert:
731 case Decl::TemplateParamObject:
732 case Decl::OMPThreadPrivate:
733 case Decl::OMPGroupPrivate:
734 case Decl::OMPAllocate:
735 case Decl::OMPCapturedExpr:
736 case Decl::OMPRequires:
739 case Decl::LifetimeExtendedTemporary:
740 case Decl::RequiresExprBody:
741 case Decl::UnnamedGlobalConstant:
747 case Decl::CXXRecord:
748 case Decl::NamespaceAlias:
750 case Decl::UsingEnum:
751 case Decl::UsingDirective:
755 case Decl::Decomposition: {
758 "Should not see file-scope variables inside a function!");
760 if (evaluateConditionDecl)
764 case Decl::OpenACCDeclare:
767 case Decl::OpenACCRoutine:
771 case Decl::TypeAlias: {
778 case Decl::ImplicitConceptSpecialization:
779 case Decl::TopLevelStmt:
780 case Decl::UsingPack:
781 case Decl::OMPDeclareMapper:
782 case Decl::OMPDeclareReduction:
784 std::string(
"emitDecl: unhandled decl type: ") +
791 if (!
sanOpts.has(SanitizerKind::NullabilityAssign))
801 : addr(addr),
type(
type), destroyer(destroyer) {}
814 CallStackRestore(Address stack) : stack(stack) {}
815 void emit(CIRGenFunction &cgf)
override {
816 mlir::Location loc = stack.
getPointer().getLoc();
827 assert(dtorKind &&
"cannot push destructor for trivial type");
846 mlir::Value numElements,
855 cir::PointerType ptrToElmType = builder.getPointerTo(cirElementType);
860 if (
auto constantCount = numElements.getDefiningOp<cir::ConstantOp>()) {
861 if (
auto constIntAttr = constantCount.getValueAttr<cir::IntAttr>())
862 size = constIntAttr.getUInt();
864 cgm.errorNYI(begin.getDefiningOp()->getLoc(),
865 "dynamic-length array expression");
868 auto arrayTy = cir::ArrayType::get(cirElementType, size);
869 mlir::Value arrayOp = builder.createPtrBitcast(begin, arrayTy);
872 cir::ArrayDtor::create(
874 [&](mlir::OpBuilder &
b, mlir::Location loc) {
875 auto arg =
b.getInsertionBlock()->addArgument(ptrToElmType, loc);
880 destroyer(*
this, curAddr, elementType);
882 cir::YieldOp::create(builder, loc);
897 return destroyer(*
this, addr,
type);
904 auto constantCount =
length.getDefiningOp<cir::ConstantOp>();
905 if (!constantCount) {
907 cgm.errorNYI(
"emitDestroy: variable length array");
911 auto constIntAttr = mlir::dyn_cast<cir::IntAttr>(constantCount.getValue());
913 if (constIntAttr && constIntAttr.getUInt() == 0)
920 if (constantCount.use_empty())
921 constantCount.erase();
928 llvm_unreachable(
"no destroyer for trivial dtor");
934 cgm.errorNYI(
"getDestroyer: other destruction kind");
937 llvm_unreachable(
"Unknown DestructionKind");
941 ehStack.pushCleanup<CallStackRestore>(kind, spMem);
962 llvm_unreachable(
"no cleanup for trivially-destructible variable");
968 cgm.errorNYI(var->getSourceRange(),
"emitAutoVarTypeCleanup: NRVO");
977 cgm.errorNYI(var->getSourceRange(),
978 "emitAutoVarTypeCleanup: other dtor kind");
987 ehStack.pushCleanup<DestroyObject>(cleanupKind, addr,
type, destroyer);
991 if (
auto *dd = dyn_cast_if_present<DecompositionDecl>(vd)) {
992 for (
auto *
b : dd->flat_bindings())
993 if (
auto *hd =
b->getHoldingVar())
static void emit(Program &P, llvm::SmallVectorImpl< std::byte > &Code, const T &Val, bool &Success)
Helper to write bytecode and bail out if 32-bit offsets become invalid.
static void emitStoresForConstant(CIRGenModule &cgm, const VarDecl &d, Address addr, bool isVolatile, CIRGenBuilderTy &builder, mlir::TypedAttr constant)
static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d)
This file defines OpenACC nodes for declarative directives.
Defines the clang::Expr interface and subclasses for C++ expressions.
cir::ConstantOp getConstant(mlir::Location loc, mlir::TypedAttr attr)
llvm::TypeSize getTypeAllocSize(mlir::Type ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
const LangOptions & getLangOpts() const
CharUnits getDeclAlign(const Decl *D, bool ForAlignof=false) const
Return a conservative estimate of the alignment of the specified decl D.
const ArrayType * getAsArrayType(QualType T) const
Type Query functions.
Represents an array type, per C99 6.7.5.2 - Array Declarators.
mlir::Value getPointer() const
mlir::Type getElementType() const
Address withElementType(CIRGenBuilderTy &builder, mlir::Type ElemTy) const
Return address with different element type, a bitcast pointer, and the same alignment.
clang::CharUnits getAlignment() const
mlir::Operation * getDefiningOp() const
Get the operation which defines this address.
static AggValueSlot forLValue(const LValue &LV, IsDestructed_t isDestructed, IsAliased_t isAliased, Overlap_t mayOverlap, IsZeroed_t isZeroed=IsNotZeroed)
cir::StackRestoreOp createStackRestore(mlir::Location loc, mlir::Value v)
cir::LoadOp createLoad(mlir::Location loc, Address addr, bool isVolatile=false)
cir::StoreOp createStore(mlir::Location loc, mlir::Value val, Address dst, bool isVolatile=false, mlir::IntegerAttr align={}, cir::MemOrderAttr order={})
void emitOpenACCRoutine(const OpenACCRoutineDecl &d)
cir::GlobalOp addInitializerToStaticVarDecl(const VarDecl &d, cir::GlobalOp gv, cir::GetGlobalOp gvAddr)
Add the initializer for 'd' to the global variable that has already been created for it.
static cir::TypeEvaluationKind getEvaluationKind(clang::QualType type)
Return the cir::TypeEvaluationKind of QualType type.
AutoVarEmission emitAutoVarAlloca(const clang::VarDecl &d, mlir::OpBuilder::InsertPoint ip={})
void emitAutoVarTypeCleanup(const AutoVarEmission &emission, clang::QualType::DestructionKind dtorKind)
Enter a destroy cleanup for the given local variable.
void emitVariablyModifiedType(QualType ty)
const clang::LangOptions & getLangOpts() const
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,...
VlaSizePair getVLASize(const VariableArrayType *type)
Returns an MLIR::Value+QualType pair that corresponds to the size, in non-variably-sized elements,...
void emitStaticVarDecl(const VarDecl &d, cir::GlobalLinkageKind linkage)
mlir::Value emitComplexExpr(const Expr *e)
Emit the computation of the specified expression of complex type, returning the result.
bool isTrivialInitializer(const Expr *init)
Determine whether the given initializer is trivial in the sense that it requires no code to be genera...
void emitOpenACCDeclare(const OpenACCDeclareDecl &d)
mlir::Location getLoc(clang::SourceLocation srcLoc)
Helpers to convert Clang's SourceLocation to a MLIR Location.
void emitExprAsInit(const clang::Expr *init, const clang::ValueDecl *d, LValue lvalue, bool capturedByInit=false)
Emit an expression as an initializer for an object (variable, field, etc.) at the given location.
mlir::Value emitArrayLength(const clang::ArrayType *arrayType, QualType &baseType, Address &addr)
Computes the length of an array in elements, as well as the base element type and a properly-typed fi...
RValue emitReferenceBindingToExpr(const Expr *e)
Emits a reference binding to the passed in expression.
CleanupKind getCleanupKind(QualType::DestructionKind kind)
EHScopeStack ehStack
Tracks function scope overall cleanup handling.
clang::SanitizerSet sanOpts
Sanitizers enabled for this function.
mlir::Type convertTypeForMem(QualType t)
void pushDestroy(QualType::DestructionKind dtorKind, Address addr, QualType type)
Push the standard destructor for the given type as at least a normal cleanup.
void emitVarDecl(const clang::VarDecl &d)
This method handles emission of any variable declaration inside a function, including static vars etc...
static Destroyer destroyCXXObject
Address returnValue
The temporary alloca to hold the return value.
void emitArrayDestroy(mlir::Value begin, mlir::Value numElements, QualType elementType, CharUnits elementAlign, Destroyer *destroyer)
Destroys all the elements of the given array, beginning from last to first.
void emitStoreOfComplex(mlir::Location loc, mlir::Value v, LValue dest, bool isInit)
EmitStoreOfComplex - Store a complex number into the specified l-value.
void emitScalarInit(const clang::Expr *init, mlir::Location loc, LValue lvalue, bool capturedByInit=false)
void emitAutoVarInit(const AutoVarEmission &emission)
Emit the initializer for an allocated variable.
void maybeEmitDeferredVarDeclInit(const VarDecl *vd)
mlir::Value emitScalarExpr(const clang::Expr *e, bool ignoreResultAssign=false)
Emit the computation of the specified expression of scalar type.
void pushStackRestore(CleanupKind kind, Address spMem)
void emitAutoVarDecl(const clang::VarDecl &d)
Emit code and set up symbol table for a variable declaration with auto, register, or no storage class...
CIRGenBuilderTy & getBuilder()
bool didCallStackSave
Whether a cir.stacksave operation has been added.
void emitDecl(const clang::Decl &d, bool evaluateConditionDecl=false)
void emitDestroy(Address addr, QualType type, Destroyer *destroyer)
Immediately perform the destruction of the given object.
mlir::MLIRContext & getMLIRContext()
Destroyer * getDestroyer(clang::QualType::DestructionKind kind)
void Destroyer(CIRGenFunction &cgf, Address addr, QualType ty)
DeclMapTy localDeclMap
This keeps track of the CIR allocas or globals for local C declarations.
LValue makeAddrLValue(Address addr, QualType ty, AlignmentSource source=AlignmentSource::Type)
void pushFullExprCleanup(CleanupKind kind, As... a)
Push a cleanup to be run at the end of the current full-expression.
std::optional< mlir::Location > currSrcLoc
Use to track source locations across nested visitor traversals.
clang::ASTContext & getContext() const
void setAddrOfLocalVar(const clang::VarDecl *vd, Address addr)
Set the address of a local variable.
void emitNullabilityCheck(LValue lhs, mlir::Value rhs, clang::SourceLocation loc)
Given an assignment *lhs = rhs, emit a test that checks if rhs is nonnull, if 1LHS is marked _Nonnull...
void emitStoreThroughLValue(RValue src, LValue dst, bool isInit=false)
Store the specified rvalue into the specified lvalue, where both are guaranteed to the have the same ...
void emitAggExpr(const clang::Expr *e, AggValueSlot slot)
void emitAutoVarCleanups(const AutoVarEmission &emission)
This class organizes the cross-function state that is used while generating CIR code.
llvm::StringRef getMangledName(clang::GlobalDecl gd)
cir::GlobalOp getOrCreateStaticVarDecl(const VarDecl &d, cir::GlobalLinkageKind linkage)
DiagnosticBuilder errorNYI(SourceLocation, llvm::StringRef)
Helpers to emit "not yet implemented" error diagnostics.
clang::ASTContext & getASTContext() const
mlir::Type convertType(clang::QualType type)
void setGVProperties(mlir::Operation *op, const NamedDecl *d) const
Set visibility, dllimport/dllexport and dso_local.
static mlir::SymbolTable::Visibility getMLIRVisibilityFromCIRLinkage(cir::GlobalLinkageKind GLK)
const clang::LangOptions & getLangOpts() const
mlir::Location getLoc(clang::SourceLocation cLoc)
Helpers to convert the presumed location of Clang's SourceLocation to an MLIR Location.
mlir::ModuleOp getModule() const
bool supportsCOMDAT() const
mlir::MLIRContext & getMLIRContext()
cir::GlobalOp getStaticLocalDeclAddress(const VarDecl *d)
mlir::Type convertTypeForMem(clang::QualType, bool forBitField=false)
Convert type T into an mlir::Type.
void finalize(cir::GlobalOp gv)
mlir::Attribute tryEmitForInitializer(const VarDecl &d)
Try to emit the initializer of the given declaration as an abstract constant.
mlir::Attribute tryEmitAbstractForInitializer(const VarDecl &d)
Try to emit the initializer of the given declaration as an abstract constant.
Information for lazily generating a cleanup.
Address getAddress() const
This trivial value class is used to represent the result of an expression that is evaluated.
static RValue get(mlir::Value v)
Represents a call to a C++ constructor.
Represents a C++ constructor within a class.
CharUnits - This is an opaque type for sizes expressed in character units.
llvm::Align getAsAlign() const
getAsAlign - Returns Quantity as a valid llvm::Align, Beware llvm::Align assumes power of two 8-bit b...
CharUnits alignmentOfArrayElement(CharUnits elementSize) const
Given that this is the alignment of the first element of an array, return the minimum alignment of an...
static CharUnits fromQuantity(QuantityType Quantity)
fromQuantity - Construct a CharUnits quantity from a raw integer type.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Decl * getNonClosureContext()
Find the innermost non-closure ancestor of this declaration, walking up through blocks,...
SourceLocation getLocation() const
const char * getDeclKindName() const
DeclContext * getDeclContext()
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
This represents one expression.
bool isConstantInitializer(ASTContext &Ctx, bool ForRef, const Expr **Culprit=nullptr) const
isConstantInitializer - Returns true if this expression can be emitted to IR as a constant,...
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
GlobalDecl - represents a global declaration.
const Decl * getDecl() const
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
std::string getNameAsString() const
Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ c...
bool isExternallyVisible() const
A (possibly-)qualified type.
@ DK_objc_strong_lifetime
@ PDIK_Struct
The type is a struct containing a field whose type is not PCK_Trivial.
LangAS getAddressSpace() const
Return the address space of this type.
bool isConstantStorage(const ASTContext &Ctx, bool ExcludeCtor, bool ExcludeDtor)
bool isPODType(const ASTContext &Context) const
Determine whether this is a Plain Old Data (POD) type (C++ 3.9p10).
Represents a struct/union/class.
Encodes a location in the source.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
RecordDecl * getAsRecordDecl() const
Retrieves the RecordDecl this type refers to.
bool isConstantSizeType() const
Return true if this is not a variable sized type, according to the rules of C99 6....
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
bool isVectorType() const
bool isRecordType() const
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool mightBeUsableInConstantExpressions(const ASTContext &C) const
Determine whether this variable's value might be usable in a constant expression, according to the re...
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
const Expr * getInit() const
bool hasExternalStorage() const
Returns true if a variable has extern or private_extern storage.
bool hasLocalStorage() const
Returns true if a variable with function scope is a non-static local variable.
bool isLocalVarDecl() const
Returns true for local variable declarations other than parameters.
StorageDuration getStorageDuration() const
Get the storage duration of this variable, per C++ [basic.stc].
bool isEscapingByref() const
Indicates the capture is a __block variable that is captured by a block that can potentially escape (...
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
@ NormalCleanup
Denotes a cleanup that should run when a scope is exited using normal control flow (falling off the e...
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
const AstTypeMatcher< ArrayType > arrayType
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
@ SD_Automatic
Automatic storage duration (most local variables).
U cast(CodeGen::Address addr)
float __ovld __cnfn length(float)
Return the length of vector p, i.e., sqrt(p.x2 + p.y 2 + ...)
static bool objCLifetime()
static bool addAutoInitAnnotation()
static bool addressSpace()
static bool emitNullabilityCheck()
static bool ehCleanupFlags()
static bool opGlobalThreadLocal()
static bool vectorConstants()
static bool aggValueSlotMayOverlap()
static bool shouldSplitConstantStore()
static bool shouldUseMemSetToInitialize()
static bool dtorCleanups()
static bool shouldUseBZeroPlusStoresToInitialize()
static bool shouldCreateMemCpyFromGlobal()
static bool dataLayoutTypeAllocSize()
static bool opAllocaCaptureByInit()
static bool opAllocaPreciseLifetime()
static bool cudaSupport()
static bool generateDebugInfo()
bool wasEmittedAsGlobal() const
bool isEscapingByRef
True if the variable is a __block variable that is captured by an escaping block.
Address addr
The address of the alloca for languages with explicit address space (e.g.
const clang::VarDecl * variable
bool isConstantAggregate
True if the variable is of aggregate type and has a constant initializer.
bool wasEmittedAsOffloadClause() const
Address getObjectAddress(CIRGenFunction &cgf) const
Returns the address of the object within this declaration.
cir::PointerType allocaInt8PtrTy
void* in alloca address space