clang 22.0.0git
|
This class organizes the cross-function state that is used while generating CIR code. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenModule.h"
Public Member Functions | |
CIRGenModule (mlir::MLIRContext &mlirContext, clang::ASTContext &astContext, const clang::CodeGenOptions &cgo, clang::DiagnosticsEngine &diags) | |
~CIRGenModule () | |
mlir::ModuleOp | getModule () const |
CIRGenBuilderTy & | getBuilder () |
clang::ASTContext & | getASTContext () const |
const clang::TargetInfo & | getTarget () const |
const clang::CodeGenOptions & | getCodeGenOpts () const |
clang::DiagnosticsEngine & | getDiags () const |
CIRGenTypes & | getTypes () |
const clang::LangOptions & | getLangOpts () const |
CIRGenCXXABI & | getCXXABI () const |
mlir::MLIRContext & | getMLIRContext () |
const cir::CIRDataLayout | getDataLayout () const |
void | handleCXXStaticMemberVarInstantiation (VarDecl *vd) |
Tell the consumer that this variable has been instantiated. | |
mlir::Operation * | getGlobalValue (llvm::StringRef ref) |
cir::GlobalOp | getStaticLocalDeclAddress (const VarDecl *d) |
void | setStaticLocalDeclAddress (const VarDecl *d, cir::GlobalOp c) |
cir::GlobalOp | getOrCreateStaticVarDecl (const VarDecl &d, cir::GlobalLinkageKind linkage) |
cir::GlobalOp | getOrCreateCIRGlobal (llvm::StringRef mangledName, mlir::Type ty, LangAS langAS, const VarDecl *d, ForDefinition_t isForDefinition) |
If the specified mangled name is not in the module, create and return an mlir::GlobalOp value. | |
cir::GlobalOp | getOrCreateCIRGlobal (const VarDecl *d, mlir::Type ty, ForDefinition_t isForDefinition) |
std::string | getUniqueGlobalName (const std::string &baseName) |
mlir::Value | getAddrOfGlobalVar (const VarDecl *d, mlir::Type ty={}, ForDefinition_t isForDefinition=NotForDefinition) |
Return the mlir::Value for the address of the given global variable. | |
cir::GlobalViewAttr | getAddrOfGlobalVarAttr (const VarDecl *d) |
Return the mlir::GlobalViewAttr for the address of the given global. | |
CharUnits | computeNonVirtualBaseClassOffset (const CXXRecordDecl *derivedClass, llvm::iterator_range< CastExpr::path_const_iterator > path) |
void | constructAttributeList (CIRGenCalleeInfo calleeInfo, mlir::NamedAttrList &attrs) |
Get the CIR attributes and calling convention to use for a particular function type. | |
cir::GlobalOp | createOrReplaceCXXRuntimeVariable (mlir::Location loc, llvm::StringRef name, mlir::Type ty, cir::GlobalLinkageKind linkage, clang::CharUnits alignment) |
Will return a global variable of the given type. | |
void | emitVTable (const CXXRecordDecl *rd) |
This is a callback from Sema to tell us that a particular vtable is required to be emitted in this translation unit. | |
cir::GlobalLinkageKind | getVTableLinkage (const CXXRecordDecl *rd) |
Return the appropriate linkage for the vtable, VTT, and type information of the given class. | |
mlir::Attribute | getAddrOfRTTIDescriptor (mlir::Location loc, QualType ty, bool forEH=false) |
Get the address of the RTTI descriptor for the given type. | |
mlir::Attribute | getConstantArrayFromStringLiteral (const StringLiteral *e) |
Return a constant array for the given string. | |
cir::GlobalOp | getGlobalForStringLiteral (const StringLiteral *s, llvm::StringRef name=".str") |
Return a global symbol reference to a constant array for the given string literal. | |
cir::GlobalViewAttr | getAddrOfConstantStringFromLiteral (const StringLiteral *s, llvm::StringRef name=".str") |
Return a global symbol reference to a constant array for the given string literal. | |
void | setCommonAttributes (GlobalDecl gd, mlir::Operation *op) |
Set attributes which are common to any form of a global definition (alias, Objective-C method, function, global variable). | |
const TargetCIRGenInfo & | getTargetCIRGenInfo () |
mlir::Location | getLoc (clang::SourceLocation cLoc) |
Helpers to convert the presumed location of Clang's SourceLocation to an MLIR Location. | |
mlir::Location | getLoc (clang::SourceRange cRange) |
clang::CharUnits | getClassPointerAlignment (const clang::CXXRecordDecl *rd) |
Return the best known alignment for an unknown pointer to a particular class. | |
clang::CharUnits | getNaturalTypeAlignment (clang::QualType t, LValueBaseInfo *baseInfo) |
FIXME: this could likely be a common helper and not necessarily related with codegen. | |
cir::FuncOp | getAddrOfCXXStructor (clang::GlobalDecl gd, const CIRGenFunctionInfo *fnInfo=nullptr, cir::FuncType fnType=nullptr, bool dontDefer=false, ForDefinition_t isForDefinition=NotForDefinition) |
std::pair< cir::FuncType, cir::FuncOp > | getAddrAndTypeOfCXXStructor (clang::GlobalDecl gd, const CIRGenFunctionInfo *fnInfo=nullptr, cir::FuncType fnType=nullptr, bool dontDefer=false, ForDefinition_t isForDefinition=NotForDefinition) |
mlir::Type | getVTableComponentType () |
CIRGenVTables & | getVTables () |
ItaniumVTableContext & | getItaniumVTableContext () |
const ItaniumVTableContext & | getItaniumVTableContext () const |
void | addDeferredDeclToEmit (clang::GlobalDecl GD) |
void | emitTopLevelDecl (clang::Decl *decl) |
bool | mustBeEmitted (const clang::ValueDecl *d) |
Determine whether the definition must be emitted; if this returns false , the definition can be emitted lazily if it's used. | |
bool | mayBeEmittedEagerly (const clang::ValueDecl *d) |
Determine whether the definition can be emitted eagerly, or should be delayed until the end of the translation unit. | |
bool | verifyModule () const |
cir::FuncOp | getAddrOfFunction (clang::GlobalDecl gd, mlir::Type funcType=nullptr, bool forVTable=false, bool dontDefer=false, ForDefinition_t isForDefinition=NotForDefinition) |
Return the address of the given function. | |
mlir::Operation * | getAddrOfGlobal (clang::GlobalDecl gd, ForDefinition_t isForDefinition=NotForDefinition) |
bool | shouldEmitRTTI (bool forEH=false) |
void | emitExplicitCastExprType (const ExplicitCastExpr *e, CIRGenFunction *cgf=nullptr) |
Emit type info if type of an expression is a variably modified type. | |
void | emitGlobal (clang::GlobalDecl gd) |
Emit code for a single global function or variable declaration. | |
void | emitAliasForGlobal (llvm::StringRef mangledName, mlir::Operation *op, GlobalDecl aliasGD, cir::FuncOp aliasee, cir::GlobalLinkageKind linkage) |
mlir::Type | convertType (clang::QualType type) |
void | setGlobalVisibility (mlir::Operation *op, const NamedDecl *d) const |
Set the visibility for the given global. | |
void | setDSOLocal (mlir::Operation *op) const |
void | setDSOLocal (cir::CIRGlobalValueInterface gv) const |
void | setGVProperties (mlir::Operation *op, const NamedDecl *d) const |
Set visibility, dllimport/dllexport and dso_local. | |
void | setGVPropertiesAux (mlir::Operation *op, const NamedDecl *d) const |
void | setFunctionAttributes (GlobalDecl gd, cir::FuncOp f, bool isIncompleteFunction, bool isThunk) |
Set function attributes for a function declaration. | |
void | emitGlobalDefinition (clang::GlobalDecl gd, mlir::Operation *op=nullptr) |
void | emitGlobalFunctionDefinition (clang::GlobalDecl gd, mlir::Operation *op) |
void | emitGlobalVarDefinition (const clang::VarDecl *vd, bool isTentative=false) |
void | emitGlobalOpenACCDecl (const clang::OpenACCConstructDecl *cd) |
void | emitDeclContext (const DeclContext *dc) |
mlir::Value | emitNullConstant (QualType t, mlir::Location loc) |
Return the result of value-initializing the given type, i.e. | |
llvm::StringRef | getMangledName (clang::GlobalDecl gd) |
void | emitTentativeDefinition (const VarDecl *d) |
void | updateCompletedType (const clang::TagDecl *td) |
cir::FuncOp | codegenCXXStructor (clang::GlobalDecl gd) |
bool | supportsCOMDAT () const |
void | maybeSetTrivialComdat (const clang::Decl &d, mlir::Operation *op) |
void | replaceUsesOfNonProtoTypeWithRealFunction (mlir::Operation *old, cir::FuncOp newFn) |
This function is called when we implement a function with no prototype, e.g. | |
cir::FuncOp | getOrCreateCIRFunction (llvm::StringRef mangledName, mlir::Type funcType, clang::GlobalDecl gd, bool forVTable, bool dontDefer=false, bool isThunk=false, ForDefinition_t isForDefinition=NotForDefinition, mlir::ArrayAttr extraAttrs={}) |
cir::FuncOp | createCIRFunction (mlir::Location loc, llvm::StringRef name, cir::FuncType funcType, const clang::FunctionDecl *funcDecl) |
cir::FuncOp | getBuiltinLibFunction (const FunctionDecl *fd, unsigned builtinID) |
Given a builtin id for a function like "__builtin_fabsf", return a Function* for "fabsf". | |
mlir::IntegerAttr | getSize (CharUnits size) |
void | emitDeferred () |
Emit any needed decls for which code generation was deferred. | |
void | emitGlobalDecl (const clang::GlobalDecl &d) |
Helper for emitDeferred to apply actual codegen. | |
const llvm::Triple & | getTriple () const |
void | release () |
cir::VisibilityAttr | getGlobalVisibilityAttrFromDecl (const Decl *decl) |
cir::GlobalLinkageKind | getFunctionLinkage (GlobalDecl gd) |
cir::GlobalLinkageKind | getCIRLinkageForDeclarator (const DeclaratorDecl *dd, GVALinkage linkage, bool isConstantVariable) |
void | setFunctionLinkage (GlobalDecl gd, cir::FuncOp f) |
cir::GlobalLinkageKind | getCIRLinkageVarDefinition (const VarDecl *vd, bool isConstant) |
void | addReplacement (llvm::StringRef name, mlir::Operation *op) |
DiagnosticBuilder | errorNYI (SourceLocation, llvm::StringRef) |
Helpers to emit "not yet implemented" error diagnostics. | |
template<typename T > | |
DiagnosticBuilder | errorNYI (SourceLocation loc, llvm::StringRef feature, const T &name) |
DiagnosticBuilder | errorNYI (mlir::Location loc, llvm::StringRef feature) |
DiagnosticBuilder | errorNYI (llvm::StringRef feature) const |
DiagnosticBuilder | errorNYI (SourceRange, llvm::StringRef) |
template<typename T > | |
DiagnosticBuilder | errorNYI (SourceRange loc, llvm::StringRef feature, const T &name) |
![]() | |
CIRGenTypeCache () | |
clang::CharUnits | getSizeAlign () const |
clang::CharUnits | getPointerAlign () const |
Static Public Member Functions | |
static cir::GlobalOp | createGlobalOp (CIRGenModule &cgm, mlir::Location loc, llvm::StringRef name, mlir::Type t, bool isConstant=false, mlir::Operation *insertPoint=nullptr) |
static void | setInitializer (cir::GlobalOp &op, mlir::Attribute value) |
static mlir::SymbolTable::Visibility | getMLIRVisibilityFromCIRLinkage (cir::GlobalLinkageKind GLK) |
static cir::VisibilityKind | getGlobalVisibilityKindFromClangVisibility (clang::VisibilityAttr::VisibilityType visibility) |
static mlir::SymbolTable::Visibility | getMLIRVisibility (cir::GlobalOp op) |
Public Attributes | |
mlir::Operation * | lastGlobalOp = nullptr |
llvm::DenseMap< const Decl *, cir::GlobalOp > | staticLocalDeclMap |
llvm::StringMap< unsigned > | cgGlobalNames |
std::map< llvm::StringRef, clang::GlobalDecl > | deferredDecls |
This contains all the decls which have definitions but which are deferred for emission and therefore should only be output if they are actually used. | |
std::vector< clang::GlobalDecl > | deferredDeclsToEmit |
![]() | |
cir::VoidType | VoidTy |
cir::IntType | SInt8Ty |
cir::IntType | SInt16Ty |
cir::IntType | SInt32Ty |
cir::IntType | SInt64Ty |
cir::IntType | SInt128Ty |
cir::IntType | UInt8Ty |
cir::IntType | UInt16Ty |
cir::IntType | UInt32Ty |
cir::IntType | UInt64Ty |
cir::IntType | UInt128Ty |
cir::FP16Type | FP16Ty |
cir::BF16Type | BFloat16Ty |
cir::SingleType | FloatTy |
cir::DoubleType | DoubleTy |
cir::FP80Type | FP80Ty |
cir::FP128Type | FP128Ty |
union { | |
mlir::Type UIntPtrTy | |
mlir::Type SizeTy | |
}; | |
intptr_t, size_t, and ptrdiff_t, which we assume are the same size. | |
mlir::Type | PtrDiffTy |
cir::PointerType | VoidPtrTy |
void* in address space 0 | |
cir::PointerType | UInt8PtrTy |
union { | |
unsigned char PointerAlignInBytes | |
unsigned char PointerSizeInBytes | |
}; | |
The size and alignment of a pointer into the generic address space. | |
unsigned char | SizeAlignInBytes |
The alignment of size_t. | |
This class organizes the cross-function state that is used while generating CIR code.
Definition at line 56 of file CIRGenModule.h.
CIRGenModule::CIRGenModule | ( | mlir::MLIRContext & | mlirContext, |
clang::ASTContext & | astContext, | ||
const clang::CodeGenOptions & | cgo, | ||
clang::DiagnosticsEngine & | diags | ||
) |
Definition at line 59 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypeCache::BFloat16Ty, clang::Default, clang::CIRGen::CIRGenTypeCache::DoubleTy, clang::CIRGen::CIRGenTypeCache::FloatTy, clang::CIRGen::CIRGenTypeCache::FP128Ty, clang::CIRGen::CIRGenTypeCache::FP16Ty, clang::CIRGen::CIRGenTypeCache::FP80Ty, getMLIRContext(), clang::TargetInfo::getPointerAlign(), clang::CharUnits::getQuantity(), clang::ASTContext::getSignedSizeType(), clang::ASTContext::getTargetInfo(), getTriple(), clang::ASTContext::getTypeSize(), clang::CIRGen::CIRGenTypeCache::PointerAlignInBytes, clang::CIRGen::CIRGenTypeCache::PtrDiffTy, clang::CIRGen::CIRGenTypeCache::SInt128Ty, clang::CIRGen::CIRGenTypeCache::SInt16Ty, clang::CIRGen::CIRGenTypeCache::SInt32Ty, clang::CIRGen::CIRGenTypeCache::SInt64Ty, clang::CIRGen::CIRGenTypeCache::SInt8Ty, clang::CIRGen::CIRGenTypeCache::SizeAlignInBytes, clang::ASTContext::toCharUnitsFromBits(), clang::CIRGen::CIRGenTypeCache::UInt128Ty, clang::CIRGen::CIRGenTypeCache::UInt16Ty, clang::CIRGen::CIRGenTypeCache::UInt32Ty, clang::CIRGen::CIRGenTypeCache::UInt64Ty, clang::CIRGen::CIRGenTypeCache::UInt8PtrTy, clang::CIRGen::CIRGenTypeCache::UInt8Ty, clang::CIRGen::CIRGenTypeCache::UIntPtrTy, clang::CIRGen::CIRGenTypeCache::VoidPtrTy, and clang::CIRGen::CIRGenTypeCache::VoidTy.
|
default |
|
inline |
Definition at line 273 of file CIRGenModule.h.
References deferredDeclsToEmit.
Referenced by emitGlobal(), and getOrCreateCIRFunction().
void CIRGenModule::addReplacement | ( | llvm::StringRef | name, |
mlir::Operation * | op | ||
) |
Definition at line 938 of file CIRGenModule.cpp.
cir::FuncOp CIRGenModule::codegenCXXStructor | ( | clang::GlobalDecl | gd | ) |
Definition at line 22 of file CIRGenCXX.cpp.
References clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), clang::CIRGen::ForDefinition, getAddrOfCXXStructor(), clang::CIRGen::CIRGenTypes::getFunctionType(), getTypes(), cir::MissingFeatures::opFuncAttributesForDefinition(), and setFunctionLinkage().
CharUnits CIRGenModule::computeNonVirtualBaseClassOffset | ( | const CXXRecordDecl * | derivedClass, |
llvm::iterator_range< CastExpr::path_const_iterator > | path | ||
) |
Definition at line 2169 of file CIRGenModule.cpp.
References getASTContext(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), and clang::CharUnits::Zero().
Referenced by clang::CIRGen::CIRGenFunction::getAddressOfBaseClass().
void CIRGenModule::constructAttributeList | ( | CIRGenCalleeInfo | calleeInfo, |
mlir::NamedAttrList & | attrs | ||
) |
Get the CIR attributes and calling convention to use for a particular function type.
Construct the CIR attribute list of a function or call.
calleeInfo | - The callee information these attributes are being constructed for. If valid, the attributes applied to this decl may contribute to the function attributes and calling convention. |
Definition at line 113 of file CIRGenCall.cpp.
References addAttributesFromFunctionProtoType(), getBuilder(), clang::CIRGen::CIRGenCalleeInfo::getCalleeDecl(), clang::CIRGen::CIRGenCalleeInfo::getCalleeFunctionProtoType(), clang::GlobalDecl::getDecl(), getMLIRContext(), clang::Decl::hasAttr(), cir::MissingFeatures::opCallAttrs(), and cir::MissingFeatures::opCallCallConv().
Referenced by clang::CIRGen::CIRGenFunction::emitCall().
mlir::Type CIRGenModule::convertType | ( | clang::QualType | type | ) |
Definition at line 2145 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::convertType(), and clang::ast_matchers::type.
Referenced by ConstExprEmitter::convertType(), emitGlobalVarDefinition(), getAddrOfFunction(), getBuiltinLibFunction(), getConstantArrayFromStringLiteral(), getOrCreateStaticVarDecl(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), and clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit().
cir::FuncOp CIRGenModule::createCIRFunction | ( | mlir::Location | loc, |
llvm::StringRef | name, | ||
cir::FuncType | funcType, | ||
const clang::FunctionDecl * | funcDecl | ||
) |
Definition at line 1997 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenFunction::curFn, getMLIRContext(), clang::FunctionDecl::hasPrototype(), cir::MissingFeatures::opFuncAstDeclAttr(), and cir::MissingFeatures::opFuncExtraAttrs().
Referenced by emitAliasForGlobal(), and getOrCreateCIRFunction().
|
static |
Definition at line 464 of file CIRGenModule.cpp.
References getBuilder(), getModule(), and lastGlobalOp.
Referenced by createOrReplaceCXXRuntimeVariable(), and generateStringLiteral().
cir::GlobalOp CIRGenModule::createOrReplaceCXXRuntimeVariable | ( | mlir::Location | loc, |
llvm::StringRef | name, | ||
mlir::Type | ty, | ||
cir::GlobalLinkageKind | linkage, | ||
clang::CharUnits | alignment | ||
) |
Will return a global variable of the given type.
If a variable with a different type already exists then a new variable with the right type will be created and all uses of the old variable will be replaced with a bitcast to the new variable.
Definition at line 997 of file CIRGenModule.cpp.
References createGlobalOp(), errorNYI(), getMLIRContext(), getMLIRVisibility(), getSize(), cir::isWeakForLinker(), setDSOLocal(), and supportsCOMDAT().
void CIRGenModule::emitAliasForGlobal | ( | llvm::StringRef | mangledName, |
mlir::Operation * | op, | ||
GlobalDecl | aliasGD, | ||
cir::FuncOp | aliasee, | ||
cir::GlobalLinkageKind | linkage | ||
) |
Definition at line 2105 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), createCIRFunction(), errorNYI(), clang::GlobalDecl::getDecl(), clang::CIRGen::CIRGenTypes::getFunctionType(), getLoc(), clang::Decl::getSourceRange(), getTypes(), cir::MissingFeatures::opGlobalUnnamedAddr(), and setCommonAttributes().
Referenced by emitConstructorDestructorAlias().
void CIRGenModule::emitDeclContext | ( | const DeclContext * | dc | ) |
Definition at line 1365 of file CIRGenModule.cpp.
References clang::ast_matchers::decl, clang::DeclContext::decls(), emitTopLevelDecl(), and errorNYI().
Referenced by emitTopLevelDecl().
void CIRGenModule::emitDeferred | ( | ) |
Emit any needed decls for which code generation was deferred.
Definition at line 307 of file CIRGenModule.cpp.
References cir::MissingFeatures::cudaSupport(), deferredDeclsToEmit, cir::MissingFeatures::deferredVtables(), emitDeferred(), emitGlobalDecl(), and cir::MissingFeatures::openMP().
Referenced by emitDeferred(), and release().
void CIRGenModule::emitExplicitCastExprType | ( | const ExplicitCastExpr * | e, |
CIRGenFunction * | cgf = nullptr |
||
) |
Emit type info if type of an expression is a variably modified type.
Also emit proper debug info for cast types.
Definition at line 1356 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenFunction::emitVariablyModifiedType(), cir::MissingFeatures::generateDebugInfo(), clang::Expr::getType(), and clang::Type::isVariablyModifiedType().
Referenced by clang::CIRGen::CIRGenFunction::emitCastLValue(), and clang::CIRGen::CIRGenFunction::emitPointerWithAlignment().
void CIRGenModule::emitGlobal | ( | clang::GlobalDecl | gd | ) |
Emit code for a single global function or variable declaration.
Forward declarations are emitted lazily.
Definition at line 338 of file CIRGenModule.cpp.
References addDeferredDeclToEmit(), cir::MissingFeatures::deferredCXXGlobalInit(), deferredDecls, clang::VarDecl::Definition, emitGlobalDefinition(), emitGlobalOpenACCDecl(), errorNYI(), getAddrOfGlobalVar(), clang::GlobalDecl::getDecl(), getGlobalValue(), clang::ASTContext::getInlineVariableDefinitionKind(), getMangledName(), clang::ASTContext::isMSStaticDataMemberInlineDefinition(), mayBeEmittedEagerly(), mustBeEmitted(), cir::MissingFeatures::openMP(), and clang::ASTContext::Strong.
Referenced by emitTopLevelDecl().
void CIRGenModule::emitGlobalDecl | ( | const clang::GlobalDecl & | d | ) |
Helper for emitDeferred
to apply actual codegen.
Definition at line 269 of file CIRGenModule.cpp.
References emitGlobalDefinition(), clang::CIRGen::ForDefinition, getAddrOfGlobal(), getGlobalValue(), getMangledName(), getModule(), and cir::MissingFeatures::openMP().
Referenced by emitDeferred().
void CIRGenModule::emitGlobalDefinition | ( | clang::GlobalDecl | gd, |
mlir::Operation * | op = nullptr |
||
) |
Definition at line 833 of file CIRGenModule.cpp.
References clang::ast_matchers::decl, emitGlobalFunctionDefinition(), emitGlobalVarDefinition(), clang::CIRGen::CIRGenVTables::emitThunks(), errorNYI(), clang::GlobalDecl::getDecl(), and getVTables().
Referenced by emitGlobal(), and emitGlobalDecl().
void CIRGenModule::emitGlobalFunctionDefinition | ( | clang::GlobalDecl | gd, |
mlir::Operation * | op | ||
) |
Definition at line 405 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::arrangeGlobalDeclaration(), errorNYI(), clang::CIRGen::ForDefinition, clang::CIRGen::CIRGenFunction::generateCode(), getAddrOfFunction(), clang::GlobalDecl::getDecl(), clang::CIRGen::CIRGenTypes::getFunctionType(), getTypes(), maybeSetTrivialComdat(), cir::MissingFeatures::opFuncAttributesForDefinition(), cir::MissingFeatures::opFuncMaybeHandleStaticInExternC(), setFunctionLinkage(), setGVProperties(), and cir::MissingFeatures::setLLVMFunctionFEnvAttributes().
Referenced by emitGlobalDefinition().
void CIRGenModule::emitGlobalOpenACCDecl | ( | const clang::OpenACCConstructDecl * | cd | ) |
Definition at line 27 of file CIRGenDeclOpenACC.cpp.
References errorNYI(), and clang::OpenACCConstructDecl::getSourceRange().
Referenced by emitGlobal(), and emitTopLevelDecl().
void CIRGenModule::emitGlobalVarDefinition | ( | const clang::VarDecl * | vd, |
bool | isTentative = false |
||
) |
Definition at line 705 of file CIRGenModule.cpp.
References convertType(), clang::CPlusPlus, cir::MissingFeatures::cudaSupport(), clang::QualType::DK_cxx_destructor, errorNYI(), clang::VarDecl::getAnyInitializer(), getCIRLinkageVarDefinition(), clang::ASTContext::GetGVALinkageForVariable(), getLangOpts(), getMLIRVisibilityFromCIRLinkage(), getOrCreateCIRGlobal(), clang::Stmt::getSourceRange(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getType(), cir::CIRBaseBuilderTy::getZeroInitAttr(), clang::GVA_AvailableExternally, clang::Decl::hasAttr(), clang::VarDecl::hasConstantInitialization(), clang::VarDecl::hasFlexibleArrayInit(), clang::QualType::isConstantStorage(), clang::Type::isIncompleteType(), clang::Type::isReferenceType(), cir::MissingFeatures::maybeHandleStaticInExternC(), maybeSetTrivialComdat(), clang::VarDecl::needsDestruction(), cir::MissingFeatures::needsGlobalCtorDtor(), clang::OpenCL, cir::MissingFeatures::opGlobalDLLImportExport(), cir::MissingFeatures::opGlobalThreadLocal(), and setInitializer().
Referenced by emitGlobalDefinition(), and emitTentativeDefinition().
mlir::Value CIRGenModule::emitNullConstant | ( | QualType | t, |
mlir::Location | loc | ||
) |
Return the result of value-initializing the given type, i.e.
a null expression of the given type.
Definition at line 938 of file CIRGenExprConstant.cpp.
References errorNYI(), clang::Type::getAs(), getASTContext(), clang::CIRGen::CIRGenBuilderTy::getNullPtr(), cir::CIRBaseBuilderTy::getNullValue(), getTypes(), clang::Type::isMemberDataPointerType(), and clang::Type::isRecordType().
void CIRGenModule::emitTentativeDefinition | ( | const VarDecl * | d | ) |
Definition at line 1613 of file CIRGenModule.cpp.
References deferredDecls, emitGlobalVarDefinition(), getGlobalValue(), clang::VarDecl::getInit(), getMangledName(), and mustBeEmitted().
void CIRGenModule::emitTopLevelDecl | ( | clang::Decl * | decl | ) |
Definition at line 1380 of file CIRGenModule.cpp.
References clang::Decl::castToDeclContext(), cir::MissingFeatures::cxxRecordStaticMembers(), clang::ast_matchers::decl, clang::CIRGen::CIRGenCXXABI::emitCXXConstructors(), clang::CIRGen::CIRGenCXXABI::emitCXXDestructors(), emitDeclContext(), emitGlobal(), emitGlobalOpenACCDecl(), errorNYI(), cir::MissingFeatures::generateDebugInfo(), and getCXXABI().
Referenced by emitDeclContext(), and handleCXXStaticMemberVarInstantiation().
void CIRGenModule::emitVTable | ( | const CXXRecordDecl * | rd | ) |
This is a callback from Sema to tell us that a particular vtable is required to be emitted in this translation unit.
This is only called for vtables that must be emitted (mainly due to key functions). For weak vtables, CodeGen tracks when they are needed and emits them as-needed.
Definition at line 55 of file CIRGenVTables.cpp.
References clang::CIRGen::CIRGenVTables::generateClassData().
|
inline |
Definition at line 449 of file CIRGenModule.h.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), and clang::DiagnosticsEngine::Report().
|
inline |
Definition at line 442 of file CIRGenModule.h.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), and clang::DiagnosticsEngine::Report().
|
inline |
Definition at line 434 of file CIRGenModule.h.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), and clang::DiagnosticsEngine::Report().
DiagnosticBuilder CIRGenModule::errorNYI | ( | SourceLocation | loc, |
llvm::StringRef | feature | ||
) |
Helpers to emit "not yet implemented" error diagnostics.
Definition at line 2194 of file CIRGenModule.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), and clang::DiagnosticsEngine::Report().
Referenced by clang::CIRGen::CIRGenFunction::addInitializerToStaticVarDecl(), appendParameterTypes(), clang::CIRGen::CIRGenTypes::arrangeCXXConstructorCall(), clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), arrangeFreeFunctionLikeCall(), clang::CIRGen::CIRGenTypes::arrangeGlobalDeclaration(), clang::CIRGen::CIRGenFunction::buildFunctionArgList(), clang::CIRGen::CIRGenFunction::convertTempToRValue(), clang::CIRGen::CIRGenTypes::convertType(), createCXXABI(), clang::CIRGen::CIRGenFunction::createMemTemp(), createOrReplaceCXXRuntimeVariable(), createReferenceTemporary(), clang::CIRGen::CIRGenTypes::deriveThisType(), clang::CIRGen::ConstantEmitter::emitAbstract(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), emitAliasForGlobal(), clang::CIRGen::CIRGenFunction::emitArrayLength(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), clang::CIRGen::CIRGenFunction::emitAsmStmt(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicInit(), emitAtomicOp(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarCleanups(), clang::CIRGen::CIRGenFunction::emitAutoVarInit(), clang::CIRGen::CIRGenFunction::emitAutoVarTypeCleanup(), clang::CIRGen::CIRGenFunction::emitBinaryOperatorLValue(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenFunction::emitCallArg(), clang::CIRGen::CIRGenFunction::emitCallArgs(), clang::CIRGen::CIRGenFunction::emitCallee(), clang::CIRGen::CIRGenFunction::emitCallExpr(), clang::CIRGen::CIRGenFunction::emitCallExprLValue(), clang::CIRGen::CIRGenFunction::emitCastLValue(), clang::CIRGen::CIRGenFunction::emitCheckedArgForAssume(), clang::CIRGen::CIRGenFunction::emitComplexAssignmentLValue(), clang::CIRGen::CIRGenFunction::emitComplexPrePostIncDec(), clang::CIRGen::CIRGenFunction::emitCompoundLiteralLValue(), clang::CIRGen::CIRGenFunction::emitConstructorBody(), clang::CIRGen::CIRGenFunction::emitCtorPrologue(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXConstructExpr(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberCallExpr(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), emitCXXNewAllocSize(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitCXXPseudoDestructorExpr(), clang::CIRGen::CIRGenFunction::emitCXXThrowExpr(), clang::CIRGen::CIRGenFunction::emitDecl(), emitDeclContext(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), clang::CIRGen::CIRGenFunction::emitDelegateCallArg(), clang::CIRGen::CIRGenFunction::emitDelegateCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitDelegatingCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitDestroy(), clang::CIRGen::CIRGenFunction::emitDestructorBody(), clang::CIRGen::CIRGenFunction::emitExprAsInit(), clang::CIRGen::ConstantEmitter::emitForMemory(), emitGlobal(), emitGlobalDefinition(), emitGlobalFunctionDefinition(), emitGlobalOpenACCDecl(), emitGlobalVarDeclLValue(), emitGlobalVarDefinition(), clang::CIRGen::CIRGenFunction::emitImplicitAssignmentOperatorBody(), clang::CIRGen::CIRGenFunction::emitInitializerForField(), clang::CIRGen::CIRGenFunction::emitLabelStmt(), clang::CIRGen::CIRGenFunction::emitLoadOfLValue(), clang::CIRGen::CIRGenFunction::emitLoadOfReference(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), clang::CIRGen::CIRGenFunction::emitLValue(), clang::CIRGen::CIRGenFunction::emitLValueForField(), clang::CIRGen::CIRGenFunction::emitMaterializeTemporaryExpr(), clang::CIRGen::CIRGenFunction::emitMemberExpr(), emitMemberInitializer(), emitNewInitializer(), emitNullConstant(), clang::CIRGen::CIRGenFunction::emitNullInitialization(), clang::CIRGen::CIRGenFunction::emitOpenACCAtomicConstruct(), clang::CIRGen::CIRGenFunction::emitOpenACCDeclare(), clang::CIRGen::CIRGenFunction::emitOpenACCRoutine(), clang::CIRGen::CIRGenFunction::emitOpOnBoolExpr(), emitPointerArithmetic(), clang::CIRGen::CIRGenFunction::emitPointerWithAlignment(), clang::CIRGen::CIRGenFunction::emitReturnStmt(), clang::CIRGen::CIRGenFunction::emitScalarConstant(), clang::CIRGen::CIRGenFunction::emitScalarInit(), clang::CIRGen::CIRGenFunction::emitStaticVarDecl(), clang::CIRGen::CIRGenFunction::emitStmt(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), clang::CIRGen::CIRGenFunction::emitStoreThroughLValue(), clang::CIRGen::CIRGenVTables::emitThunks(), emitTopLevelDecl(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), clang::CIRGen::CIRGenFunction::emitVarDecl(), clang::CIRGen::CIRGenFunction::emitVariablyModifiedType(), errorNYI(), clang::CIRGen::CIRGenFunction::evaluateExprAsBool(), clang::CIRGen::CIRGenVTables::generateClassData(), clang::CIRGen::CIRGenFunction::generateCode(), getAddrAndTypeOfCXXStructor(), clang::CIRGen::CIRGenFunction::getAddressOfBaseClass(), getAddrOfFunction(), getAddrOfRTTIDescriptor(), getCIRGenToUse(), getCIRLinkageForDeclarator(), getConstantArrayFromStringLiteral(), clang::CIRGen::CIRGenFunction::getDestroyer(), clang::CIRGen::CIRGenTypes::getFunctionTypeForVTable(), getGlobalForStringLiteral(), getMangledName(), getMangledNameImpl(), getOrCreateCIRFunction(), getOrCreateStaticVarDecl(), clang::CIRGen::CIRGenFunction::ConstantEmission::getReferenceLValue(), getStaticDeclName(), clang::CIRGen::CIRGenFunction::getUndefRValue(), getVTableLinkage(), clang::CIRGen::CIRGenFunction::initializeVTablePointer(), clang::CIRGen::CIRGenFunction::isLValueSuitableForInlineAtomic(), clang::CIRGen::CIRGenTypes::isZeroInitializable(), mayBeEmittedEagerly(), clang::CIRGen::CIRGenFunction::pushFullExprCleanup(), pushTemporaryCleanup(), replaceUsesOfNonProtoTypeWithRealFunction(), shouldAssumeDSOLocal(), clang::CIRGen::CIRGenFunction::startFunction(), storeAnyExprIntoOneUnit(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit(), ConstExprEmitter::VisitCastExpr(), ConstExprEmitter::VisitCXXConstructExpr(), ConstExprEmitter::VisitCXXDefaultInitExpr(), ConstExprEmitter::VisitDesignatedInitUpdateExpr(), ConstExprEmitter::VisitImplicitValueInitExpr(), ConstExprEmitter::VisitInitListExpr(), and ConstExprEmitter::VisitObjCEncodeExpr().
|
inline |
Definition at line 459 of file CIRGenModule.h.
References errorNYI(), and clang::SourceRange::getBegin().
DiagnosticBuilder CIRGenModule::errorNYI | ( | SourceRange | loc, |
llvm::StringRef | feature | ||
) |
Definition at line 2201 of file CIRGenModule.cpp.
References errorNYI(), and clang::SourceRange::getBegin().
std::pair< cir::FuncType, cir::FuncOp > CIRGenModule::getAddrAndTypeOfCXXStructor | ( | clang::GlobalDecl | gd, |
const CIRGenFunctionInfo * | fnInfo = nullptr , |
||
cir::FuncType | fnType = nullptr , |
||
bool | dontDefer = false , |
||
ForDefinition_t | isForDefinition = NotForDefinition |
||
) |
Definition at line 1485 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), clang::Dtor_Complete, errorNYI(), getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CIRGen::CIRGenTypes::getFunctionType(), getMangledName(), getOrCreateCIRFunction(), getTarget(), and getTypes().
Referenced by getAddrOfCXXStructor().
cir::GlobalViewAttr CIRGenModule::getAddrOfConstantStringFromLiteral | ( | const StringLiteral * | s, |
llvm::StringRef | name = ".str" |
||
) |
Return a global symbol reference to a constant array for the given string literal.
Return a pointer to a constant array for the given string literal.
Definition at line 1345 of file CIRGenModule.cpp.
References cir::MissingFeatures::addressSpace(), getBuilder(), getGlobalForStringLiteral(), cir::CIRBaseBuilderTy::getGlobalViewAttr(), cir::CIRBaseBuilderTy::getPointerTo(), and s.
|
inline |
Definition at line 240 of file CIRGenModule.h.
References getAddrAndTypeOfCXXStructor().
Referenced by codegenCXXStructor(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), and getAddrOfGlobal().
cir::FuncOp CIRGenModule::getAddrOfFunction | ( | clang::GlobalDecl | gd, |
mlir::Type | funcType = nullptr , |
||
bool | forVTable = false , |
||
bool | dontDefer = false , |
||
ForDefinition_t | isForDefinition = NotForDefinition |
||
) |
Return the address of the given function.
If funcType is non-null, then this function will use the specified type if it has to create it.
Definition at line 1513 of file CIRGenModule.cpp.
References convertType(), clang::Dtor_Complete, errorNYI(), getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), getMangledName(), getOrCreateCIRFunction(), and getTarget().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), emitFunctionDeclPointer(), emitGlobalFunctionDefinition(), emitNewDeleteCall(), and getAddrOfGlobal().
mlir::Operation * CIRGenModule::getAddrOfGlobal | ( | clang::GlobalDecl | gd, |
ForDefinition_t | isForDefinition = NotForDefinition |
||
) |
Definition at line 243 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::arrangeCXXMethodDeclaration(), clang::CIRGen::CIRGenTypes::arrangeGlobalDeclaration(), getAddrOfCXXStructor(), getAddrOfFunction(), getAddrOfGlobalVar(), clang::GlobalDecl::getDecl(), clang::CIRGen::CIRGenTypes::getFunctionType(), and getTypes().
Referenced by emitConstructorDestructorAlias(), and emitGlobalDecl().
mlir::Value CIRGenModule::getAddrOfGlobalVar | ( | const VarDecl * | d, |
mlir::Type | ty = {} , |
||
ForDefinition_t | isForDefinition = NotForDefinition |
||
) |
Return the mlir::Value for the address of the given global variable.
If Ty is non-null and if the global doesn't exist, then it will be created with the specified type instead of whatever the normal requested type would be. If IsForDefinition is true, it is guaranteed that an actual global with type Ty will be returned, not conversion of a variable with the same mangled name but some other type.
If ty
is non-null and if the global doesn't exist, then it will be created with the specified type instead of whatever the normal requested type would be. If isForDefinition
is true, it is guaranteed that an actual global with type ty
will be returned, not conversion of a variable with the same mangled name but some other type.
Definition at line 680 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::convertTypeForMem(), getLoc(), getOrCreateCIRGlobal(), cir::CIRBaseBuilderTy::getPointerTo(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), getTypes(), clang::VarDecl::hasGlobalStorage(), and cir::MissingFeatures::opGlobalThreadLocal().
Referenced by emitGlobal(), emitGlobalVarDeclLValue(), getAddrOfGlobal(), and handleCXXStaticMemberVarInstantiation().
cir::GlobalViewAttr CIRGenModule::getAddrOfGlobalVarAttr | ( | const VarDecl * | d | ) |
Return the mlir::GlobalViewAttr for the address of the given global.
Definition at line 695 of file CIRGenModule.cpp.
References cir::MissingFeatures::addressSpace(), clang::CIRGen::CIRGenTypes::convertTypeForMem(), cir::CIRBaseBuilderTy::getGlobalViewAttr(), getOrCreateCIRGlobal(), cir::CIRBaseBuilderTy::getPointerTo(), clang::ValueDecl::getType(), getTypes(), clang::VarDecl::hasGlobalStorage(), and clang::CIRGen::NotForDefinition.
mlir::Attribute CIRGenModule::getAddrOfRTTIDescriptor | ( | mlir::Location | loc, |
QualType | ty, | ||
bool | forEH = false |
||
) |
Get the address of the RTTI descriptor for the given type.
Definition at line 2156 of file CIRGenModule.cpp.
References errorNYI(), cir::CIRBaseBuilderTy::getConstNullPtrAttr(), clang::CIRGen::CIRGenBuilderTy::getUInt8PtrTy(), and shouldEmitRTTI().
|
inline |
Definition at line 102 of file CIRGenModule.h.
Referenced by clang::CIRGen::CIRGenCXXABI::buildThisParam(), computeNonVirtualBaseClassOffset(), clang::CIRGen::CreateCIRGenItaniumCXXABI(), createCXXABI(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), emitNullConstant(), clang::CIRGen::CIRGenFunction::getContext(), getNonMemoryType(), getOrCreateStaticVarDecl(), mustBeEmitted(), shouldBeInCOMDAT(), clang::CIRGen::ConstantEmitter::tryEmitConstantExpr(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), and clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit().
|
inline |
Definition at line 101 of file CIRGenModule.h.
Referenced by constructAttributeList(), createGlobalOp(), clang::CIRGen::CIRGenVTables::createVTableInitializer(), emitArrayConstant(), emitArraySubscriptPtr(), generateStringLiteral(), getAddrOfConstantStringFromLiteral(), clang::CIRGen::CIRGenVTables::getVTableType(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
cir::FuncOp CIRGenModule::getBuiltinLibFunction | ( | const FunctionDecl * | fd, |
unsigned | builtinID | ||
) |
Given a builtin id for a function like "__builtin_fabsf", return a Function* for "fabsf".
Definition at line 367 of file CIRGenBuiltin.cpp.
References cir::MissingFeatures::asmLabelAttr(), clang::ASTContext::BuiltinInfo, convertType(), clang::Builtin::Context::getName(), getOrCreateCIRFunction(), clang::ValueDecl::getType(), clang::Builtin::Context::isLibFunction(), and clang::ast_matchers::type.
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
cir::GlobalLinkageKind CIRGenModule::getCIRLinkageForDeclarator | ( | const DeclaratorDecl * | dd, |
GVALinkage | linkage, | ||
bool | isConstantVariable | ||
) |
Definition at line 1106 of file CIRGenModule.cpp.
References clang::CUDA, errorNYI(), clang::Decl::getAsFunction(), clang::DeclaratorDecl::getBeginLoc(), getCodeGenOpts(), clang::Decl::getDeclKindName(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::GVA_AvailableExternally, clang::GVA_DiscardableODR, clang::GVA_Internal, clang::GVA_StrongExternal, clang::GVA_StrongODR, clang::Decl::hasAttr(), and isVarDeclStrongDefinition().
Referenced by getCIRLinkageVarDefinition(), clang::CIRGen::CIRGenCXXABI::getCXXDestructorLinkage(), and getFunctionLinkage().
cir::GlobalLinkageKind CIRGenModule::getCIRLinkageVarDefinition | ( | const VarDecl * | vd, |
bool | isConstant | ||
) |
Definition at line 1239 of file CIRGenModule.cpp.
References getCIRLinkageForDeclarator(), and clang::ASTContext::GetGVALinkageForVariable().
Referenced by emitGlobalVarDefinition(), and clang::CIRGen::CIRGenFunction::emitVarDecl().
CharUnits CIRGenModule::getClassPointerAlignment | ( | const clang::CXXRecordDecl * | rd | ) |
Return the best known alignment for an unknown pointer to a particular class.
FIXME: this could likely be a common helper and not necessarily related with codegen.
Return the best known alignment for an unknown pointer to a particular class.
Definition at line 127 of file CIRGenModule.cpp.
References clang::ASTRecordLayout::getAlignment(), clang::ASTContext::getASTRecordLayout(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::isEffectivelyFinal(), and clang::CharUnits::One().
Referenced by clang::CIRGen::CIRGenFunction::loadCXXThisAddress().
|
inline |
Definition at line 104 of file CIRGenModule.h.
Referenced by collectClobbers(), clang::CIRGen::CIRGenFunction::emitCtorPrologue(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitLValueForField(), clang::CIRGen::CIRGenFunction::emitStaticVarDecl(), clang::CIRGen::CIRGenFunction::emitStoreThroughBitfieldLValue(), getCIRGenToUse(), getCIRLinkageForDeclarator(), clang::CIRGen::CIRGenFunction::getVTablePtr(), inferFlavor(), shouldAssumeDSOLocal(), and clang::CIRGen::CIRGenFunction::shouldEmitVTableTypeCheckedLoad().
mlir::Attribute CIRGenModule::getConstantArrayFromStringLiteral | ( | const StringLiteral * | e | ) |
Return a constant array for the given string.
Definition at line 869 of file CIRGenModule.cpp.
References convertType(), errorNYI(), clang::ASTContext::getAsConstantArrayType(), clang::StringLiteral::getCharByteWidth(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::CIRGen::CIRGenBuilderTy::getString(), clang::Expr::getType(), and clang::Type::isPointerType().
Referenced by getGlobalForStringLiteral(), and ConstExprEmitter::VisitStringLiteral().
|
inline |
Definition at line 109 of file CIRGenModule.h.
Referenced by clang::CIRGen::CIRGenFunction::buildFunctionArgList(), commonBuildCXXMemberOrOperatorCall(), clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), clang::CIRGen::CIRGenFunction::emitCXXThrowExpr(), clang::CIRGen::CIRGenFunction::emitDelegateCXXConstructorCall(), emitTopLevelDecl(), clang::CIRGen::CIRGenVTables::generateClassData(), getAddrAndTypeOfCXXStructor(), getAddrOfFunction(), getFunctionLinkage(), getGlobalForStringLiteral(), getMangledName(), getMangledNameImpl(), getOrCreateCIRFunction(), clang::CIRGen::CIRGenFunction::initializeVTablePointer(), clang::CIRGen::CIRGenFunction::initializeVTablePointers(), clang::CIRGen::CIRGenCallee::prepareConcreteCallee(), and clang::CIRGen::CIRGenFunction::startFunction().
|
inline |
Definition at line 112 of file CIRGenModule.h.
Referenced by clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), clang::CIRGen::CIRGenFunction::getAddrOfBitFieldStorage(), and isFullSizeType().
|
inline |
Definition at line 105 of file CIRGenModule.h.
Referenced by collectClobbers().
cir::GlobalLinkageKind CIRGenModule::getFunctionLinkage | ( | GlobalDecl | gd | ) |
Definition at line 1245 of file CIRGenModule.cpp.
References getCIRLinkageForDeclarator(), getCXXABI(), clang::CIRGen::CIRGenCXXABI::getCXXDestructorLinkage(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), and clang::ASTContext::GetGVALinkageForFunction().
Referenced by emitConstructorDestructorAlias(), getCIRGenToUse(), setFunctionAttributes(), and setFunctionLinkage().
cir::GlobalOp CIRGenModule::getGlobalForStringLiteral | ( | const StringLiteral * | s, |
llvm::StringRef | name = ".str" |
||
) |
Return a global symbol reference to a constant array for the given string literal.
Return a pointer to a constant array for the given string literal.
Definition at line 1307 of file CIRGenModule.cpp.
References c, errorNYI(), generateStringLiteral(), clang::ASTContext::getAlignOfGlobalVarInChars(), getConstantArrayFromStringLiteral(), getCXXABI(), getLangOpts(), getLoc(), getUniqueGlobalName(), s, cir::MissingFeatures::sanitizers(), and setDSOLocal().
Referenced by clang::CIRGen::CIRGenFunction::emitStringLiteralLValue(), and getAddrOfConstantStringFromLiteral().
mlir::Operation * CIRGenModule::getGlobalValue | ( | llvm::StringRef | ref | ) |
Definition at line 460 of file CIRGenModule.cpp.
Referenced by clang::CIRGen::CIRGenFunction::emitCall(), emitConstructorDestructorAlias(), emitGlobal(), emitGlobalDecl(), emitTentativeDefinition(), and getOrCreateCIRFunction().
cir::VisibilityAttr CIRGenModule::getGlobalVisibilityAttrFromDecl | ( | const Decl * | decl | ) |
Definition at line 2082 of file CIRGenModule.cpp.
References clang::ast_matchers::decl, getGlobalVisibilityKindFromClangVisibility(), and getMLIRContext().
Referenced by setFunctionAttributes().
|
static |
Definition at line 2068 of file CIRGenModule.cpp.
Referenced by getGlobalVisibilityAttrFromDecl().
|
inline |
Definition at line 257 of file CIRGenModule.h.
References clang::CIRGen::CIRGenVTables::getItaniumVTableContext().
|
inline |
Definition at line 260 of file CIRGenModule.h.
References clang::CIRGen::CIRGenVTables::getItaniumVTableContext().
|
inline |
Definition at line 107 of file CIRGenModule.h.
Referenced by clang::CIRGen::CIRGenFunction::emitCXXThrowExpr(), clang::CIRGen::CIRGenFunction::emitDelegatingCXXConstructorCall(), emitGlobalVarDefinition(), generateStringLiteral(), getCIRLinkageForDeclarator(), getGlobalForStringLiteral(), clang::CIRGen::CIRGenFunction::getLangOpts(), getMangledNameImpl(), getOrCreateCIRFunction(), getStaticDeclName(), clang::CIRGen::CIRGenFunction::isLValueSuitableForInlineAtomic(), shouldAssumeDSOLocal(), and shouldEmitRTTI().
mlir::Location CIRGenModule::getLoc | ( | clang::SourceLocation | cLoc | ) |
Helpers to convert the presumed location of Clang's SourceLocation to an MLIR Location.
Definition at line 225 of file CIRGenModule.cpp.
References clang::PresumedLoc::getColumn(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), and clang::SourceLocation::isValid().
Referenced by emitAliasForGlobal(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), clang::CIRGen::CIRGenFunction::emitArrayToPointerDecay(), clang::CIRGen::CIRGenFunction::emitOpenACCIntExpr(), clang::CIRGen::CIRGenFunction::emitOpenACCWaitConstruct(), clang::CIRGen::CIRGenFunction::emitVAArg(), getAddrOfGlobalVar(), getGlobalForStringLiteral(), getLoc(), clang::CIRGen::CIRGenFunction::getOpenACCDataOperandInfo(), getOrCreateCIRFunction(), and getOrCreateStaticVarDecl().
mlir::Location CIRGenModule::getLoc | ( | clang::SourceRange | cRange | ) |
Definition at line 234 of file CIRGenModule.cpp.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), getLoc(), and clang::SourceRange::isValid().
StringRef CIRGenModule::getMangledName | ( | clang::GlobalDecl | gd | ) |
Definition at line 1592 of file CIRGenModule.cpp.
References errorNYI(), clang::GlobalDecl::getCanonicalDecl(), getCXXABI(), clang::GlobalDecl::getDecl(), getMangledNameImpl(), and getTarget().
Referenced by emitConstructorDestructorAlias(), emitGlobal(), emitGlobalDecl(), emitTentativeDefinition(), getAddrAndTypeOfCXXStructor(), getAddrOfFunction(), getOrCreateCIRGlobal(), and getStaticDeclName().
|
inline |
Definition at line 110 of file CIRGenModule.h.
Referenced by CIRGenModule(), constructAttributeList(), createCIRFunction(), createOrReplaceCXXRuntimeVariable(), clang::CIRGen::CIRGenVTables::createVTableInitializer(), getGlobalVisibilityAttrFromDecl(), clang::CIRGen::CIRGenFunction::getMLIRContext(), and setFunctionLinkage().
|
static |
Definition at line 2037 of file CIRGenModule.cpp.
References getMLIRVisibilityFromCIRLinkage().
Referenced by createOrReplaceCXXRuntimeVariable().
|
static |
Definition at line 2046 of file CIRGenModule.cpp.
Referenced by emitGlobalVarDefinition(), getMLIRVisibility(), getOrCreateStaticVarDecl(), and setFunctionLinkage().
|
inline |
Definition at line 100 of file CIRGenModule.h.
Referenced by createGlobalOp(), emitGlobalDecl(), and getOrCreateStaticVarDecl().
CharUnits CIRGenModule::getNaturalTypeAlignment | ( | clang::QualType | t, |
LValueBaseInfo * | baseInfo | ||
) |
FIXME: this could likely be a common helper and not necessarily related with codegen.
Definition at line 142 of file CIRGenModule.cpp.
References cir::MissingFeatures::alignCXXRecordDecl(), clang::CIRGen::AttributedType, clang::CharUnits::fromQuantity(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getLangOpts(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeAlignInChars(), clang::Qualifiers::hasUnaligned(), clang::ASTContext::isAlignmentRequired(), clang::Type::isIncompleteType(), clang::CharUnits::One(), cir::MissingFeatures::opTBAA(), clang::ASTContext::toCharUnitsFromBits(), and clang::CIRGen::Type.
Referenced by clang::CIRGen::CIRGenFunction::emitLoadOfReference(), clang::CIRGen::CIRGenFunction::emitPointerWithAlignment(), clang::CIRGen::CIRGenFunction::makeNaturalAddressForPointer(), clang::CIRGen::CIRGenFunction::makeNaturalAlignAddrLValue(), and clang::CIRGen::CIRGenFunction::makeNaturalAlignPointeeAddrLValue().
cir::FuncOp CIRGenModule::getOrCreateCIRFunction | ( | llvm::StringRef | mangledName, |
mlir::Type | funcType, | ||
clang::GlobalDecl | gd, | ||
bool | forVTable, | ||
bool | dontDefer = false , |
||
bool | isThunk = false , |
||
ForDefinition_t | isForDefinition = NotForDefinition , |
||
mlir::ArrayAttr | extraAttrs = {} |
||
) |
Definition at line 1851 of file CIRGenModule.cpp.
References addDeferredDeclToEmit(), clang::CPlusPlus, createCIRFunction(), deferredDecls, errorNYI(), getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), getGlobalValue(), getLangOpts(), getLoc(), clang::Decl::getSourceRange(), clang::GlobalDecl::getWithDecl(), clang::Decl::hasAttr(), replaceUsesOfNonProtoTypeWithRealFunction(), cir::MissingFeatures::setDLLStorageClass(), setDSOLocal(), setFunctionAttributes(), and cir::MissingFeatures::weakRefReference().
Referenced by getAddrAndTypeOfCXXStructor(), getAddrOfFunction(), and getBuiltinLibFunction().
cir::GlobalOp CIRGenModule::getOrCreateCIRGlobal | ( | const VarDecl * | d, |
mlir::Type | ty, | ||
ForDefinition_t | isForDefinition | ||
) |
Definition at line 662 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::convertTypeForMem(), clang::QualType::getAddressSpace(), getMangledName(), getOrCreateCIRGlobal(), clang::ValueDecl::getType(), getTypes(), and clang::VarDecl::hasGlobalStorage().
cir::GlobalOp clang::CIRGen::CIRGenModule::getOrCreateCIRGlobal | ( | llvm::StringRef | mangledName, |
mlir::Type | ty, | ||
LangAS | langAS, | ||
const VarDecl * | d, | ||
ForDefinition_t | isForDefinition | ||
) |
If the specified mangled name is not in the module, create and return an mlir::GlobalOp value.
Referenced by emitGlobalVarDefinition(), getAddrOfGlobalVar(), getAddrOfGlobalVarAttr(), and getOrCreateCIRGlobal().
cir::GlobalOp CIRGenModule::getOrCreateStaticVarDecl | ( | const VarDecl & | d, |
cir::GlobalLinkageKind | linkage | ||
) |
Definition at line 271 of file CIRGenDecl.cpp.
References cir::MissingFeatures::addressSpace(), convertType(), clang::CIRGen::CIRGenTypes::convertTypeForMem(), clang::CIRGen::CIRGenBuilderTy::createVersionedGlobal(), errorNYI(), getASTContext(), clang::GlobalDecl::getDecl(), clang::Decl::getDeclContext(), getLoc(), clang::Decl::getLocation(), getMLIRVisibilityFromCIRLinkage(), getModule(), clang::Decl::getNonClosureContext(), clang::VarDecl::getSourceRange(), getStaticDeclName(), getStaticLocalDeclAddress(), clang::ValueDecl::getType(), getTypes(), cir::CIRBaseBuilderTy::getZeroInitAttr(), clang::Decl::hasAttr(), clang::Type::isConstantSizeType(), cir::MissingFeatures::openMP(), cir::MissingFeatures::opGlobalThreadLocal(), setGVProperties(), and supportsCOMDAT().
Referenced by clang::CIRGen::CIRGenFunction::emitStaticVarDecl().
|
inline |
Definition at line 389 of file CIRGenModule.h.
References cir::CIRBaseBuilderTy::getSizeFromCharUnits().
Referenced by createOrReplaceCXXRuntimeVariable(), clang::CIRGen::CIRGenFunction::createTempAllocaWithoutCast(), and generateStringLiteral().
|
inline |
Definition at line 131 of file CIRGenModule.h.
References staticLocalDeclMap.
Referenced by getOrCreateStaticVarDecl().
|
inline |
Definition at line 103 of file CIRGenModule.h.
Referenced by clang::CIRGen::CIRGenFunction::emitConstructorBody(), clang::CIRGen::CIRGenFunction::emitCtorPrologue(), clang::CIRGen::CIRGenFunction::emitLoadOfBitfieldLValue(), clang::CIRGen::CIRGenFunction::emitStoreThroughBitfieldLValue(), getAddrAndTypeOfCXXStructor(), getAddrOfFunction(), getCIRGenToUse(), getMangledName(), clang::CIRGen::CIRGenFunction::getTarget(), and getTargetCIRGenInfo().
const TargetCIRGenInfo & CIRGenModule::getTargetCIRGenInfo | ( | ) |
Definition at line 197 of file CIRGenModule.cpp.
References clang::CIRGen::createX8664TargetCIRGenInfo(), getTarget(), clang::TargetInfo::getTriple(), cir::MissingFeatures::targetCIRGenInfoArch(), and cir::MissingFeatures::targetCIRGenInfoOS().
Referenced by arrangeFreeFunctionLikeCall().
|
inline |
Definition at line 399 of file CIRGenModule.h.
References clang::TargetInfo::getTriple().
Referenced by CIRGenModule(), shouldAssumeDSOLocal(), shouldEmitRTTI(), and supportsCOMDAT().
|
inline |
Definition at line 106 of file CIRGenModule.h.
Referenced by codegenCXXStructor(), clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::CIRGenFunction::convertTypeForMem(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), emitAliasForGlobal(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), emitGlobalFunctionDefinition(), clang::CIRGen::CIRGenFunction::emitLValueForBitField(), clang::CIRGen::CIRGenFunction::emitLValueForField(), clang::CIRGen::CIRGenFunction::emitLValueForFieldInitialization(), emitNewDeleteCall(), emitNullConstant(), clang::CIRGen::CIRGenFunction::emitNullInitialization(), getAddrAndTypeOfCXXStructor(), getAddrOfGlobal(), getAddrOfGlobalVar(), getAddrOfGlobalVarAttr(), getOrCreateCIRGlobal(), getOrCreateStaticVarDecl(), clang::CIRGen::CIRGenFunction::getTypes(), and clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit().
std::string CIRGenModule::getUniqueGlobalName | ( | const std::string & | baseName | ) |
Definition at line 1290 of file CIRGenModule.cpp.
References cgGlobalNames.
Referenced by getGlobalForStringLiteral().
mlir::Type CIRGenModule::getVTableComponentType | ( | ) |
Definition at line 28 of file CIRGenVTables.cpp.
References clang::CIRGen::CIRGenBuilderTy::getUInt8PtrTy(), and cir::MissingFeatures::vtableRelativeLayout().
cir::GlobalLinkageKind CIRGenModule::getVTableLinkage | ( | const CXXRecordDecl * | rd | ) |
Return the appropriate linkage for the vtable, VTT, and type information of the given class.
Compute the required linkage of the vtable for the given class.
Note that we only call this at the end of the translation unit.
Definition at line 181 of file CIRGenVTables.cpp.
References cir::MissingFeatures::appleKext(), errorNYI(), clang::ASTContext::getCurrentKeyFunction(), clang::ASTContext::getLangOpts(), clang::TagDecl::getSourceRange(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isInlined(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
|
inline |
Definition at line 255 of file CIRGenModule.h.
Referenced by emitGlobalDefinition().
void CIRGenModule::handleCXXStaticMemberVarInstantiation | ( | VarDecl * | vd | ) |
Tell the consumer that this variable has been instantiated.
Definition at line 446 of file CIRGenModule.cpp.
References clang::VarDecl::Definition, emitTopLevelDecl(), getAddrOfGlobalVar(), clang::VarDecl::getDefinition(), clang::VarDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), clang::VarDecl::isThisDeclarationADefinition(), and clang::TSK_ExplicitInstantiationDefinition.
bool CIRGenModule::mayBeEmittedEagerly | ( | const clang::ValueDecl * | d | ) |
Determine whether the definition can be emitted eagerly, or should be delayed until the end of the translation unit.
This is relevant for definitions whose linkage can change, e.g. implicit function instantiations which may later be explicitly instantiated.
Definition at line 1653 of file CIRGenModule.cpp.
References errorNYI(), clang::ASTContext::getInlineVariableDefinitionKind(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::QualType::isConstantStorage(), clang::TargetInfo::isTLSSupported(), clang::TSK_ImplicitInstantiation, and clang::ASTContext::WeakUnknown.
Referenced by emitGlobal().
void CIRGenModule::maybeSetTrivialComdat | ( | const clang::Decl & | d, |
mlir::Operation * | op | ||
) |
Definition at line 922 of file CIRGenModule.cpp.
References shouldBeInCOMDAT().
Referenced by emitGlobalFunctionDefinition(), and emitGlobalVarDefinition().
bool CIRGenModule::mustBeEmitted | ( | const clang::ValueDecl * | d | ) |
Determine whether the definition must be emitted; if this returns false
, the definition can be emitted lazily if it's used.
Definition at line 1636 of file CIRGenModule.cpp.
References clang::ASTContext::DeclMustBeEmitted(), getASTContext(), clang::SD_Static, and clang::SD_Thread.
Referenced by emitGlobal(), and emitTentativeDefinition().
void CIRGenModule::release | ( | ) |
Definition at line 2094 of file CIRGenModule.cpp.
References cir::MissingFeatures::cgmRelease(), and emitDeferred().
void CIRGenModule::replaceUsesOfNonProtoTypeWithRealFunction | ( | mlir::Operation * | old, |
cir::FuncOp | newFn | ||
) |
This function is called when we implement a function with no prototype, e.g.
"int foo() {}". If there are existing call uses of the old function in the module, this adjusts them to call the new function directly.
This is not just a cleanup: the always_inline pass requires direct calls to functions to be able to inline them. If there is a bitcast in the way, it won't inline them. Instcombine normally deletes these calls, but it isn't run at -O0.
Definition at line 1192 of file CIRGenModule.cpp.
References cir::CIRBaseBuilderTy::createCallOp(), errorNYI(), cir::MissingFeatures::opFuncExceptions(), cir::MissingFeatures::opFuncOperandBundles(), and cir::MissingFeatures::opFuncParameterAttributes().
Referenced by getOrCreateCIRFunction().
void CIRGenModule::setCommonAttributes | ( | GlobalDecl | gd, |
mlir::Operation * | op | ||
) |
Set attributes which are common to any form of a global definition (alias, Objective-C method, function, global variable).
NOTE: This should only be called for definitions.
Definition at line 499 of file CIRGenModule.cpp.
References cir::MissingFeatures::defaultVisibility(), clang::GlobalDecl::getDecl(), cir::MissingFeatures::opGlobalUsedOrCompilerUsed(), and setGVProperties().
Referenced by emitAliasForGlobal().
void CIRGenModule::setDSOLocal | ( | cir::CIRGlobalValueInterface | gv | ) | const |
Definition at line 1808 of file CIRGenModule.cpp.
References shouldAssumeDSOLocal().
void CIRGenModule::setDSOLocal | ( | mlir::Operation * | op | ) | const |
Definition at line 1812 of file CIRGenModule.cpp.
References setDSOLocal().
Referenced by createOrReplaceCXXRuntimeVariable(), generateStringLiteral(), getGlobalForStringLiteral(), getOrCreateCIRFunction(), setDSOLocal(), and setGVPropertiesAux().
void CIRGenModule::setFunctionAttributes | ( | GlobalDecl | gd, |
cir::FuncOp | f, | ||
bool | isIncompleteFunction, | ||
bool | isThunk | ||
) |
Set function attributes for a function declaration.
Definition at line 1830 of file CIRGenModule.cpp.
References clang::ast_matchers::decl, clang::GlobalDecl::getDecl(), getFunctionLinkage(), getGlobalVisibilityAttrFromDecl(), cir::MissingFeatures::setFunctionAttributes(), and cir::MissingFeatures::setTargetAttributes().
Referenced by getOrCreateCIRFunction().
|
inline |
Definition at line 418 of file CIRGenModule.h.
References getFunctionLinkage(), getMLIRContext(), and getMLIRVisibilityFromCIRLinkage().
Referenced by codegenCXXStructor(), and emitGlobalFunctionDefinition().
void CIRGenModule::setGlobalVisibility | ( | mlir::Operation * | op, |
const NamedDecl * | d | ||
) | const |
Set the visibility for the given global.
Definition at line 1803 of file CIRGenModule.cpp.
References cir::MissingFeatures::opGlobalVisibility().
Referenced by setGVPropertiesAux().
void CIRGenModule::setGVProperties | ( | mlir::Operation * | op, |
const NamedDecl * | d | ||
) | const |
Set visibility, dllimport/dllexport and dso_local.
This must be called after dllimport/dllexport is set.
Definition at line 1817 of file CIRGenModule.cpp.
References cir::MissingFeatures::opGlobalDLLImportExport(), and setGVPropertiesAux().
Referenced by emitGlobalFunctionDefinition(), getOrCreateStaticVarDecl(), and setCommonAttributes().
void CIRGenModule::setGVPropertiesAux | ( | mlir::Operation * | op, |
const NamedDecl * | d | ||
) | const |
Definition at line 1823 of file CIRGenModule.cpp.
References cir::MissingFeatures::opGlobalPartition(), setDSOLocal(), and setGlobalVisibility().
Referenced by setGVProperties().
|
static |
Definition at line 1479 of file CIRGenModule.cpp.
References cir::MissingFeatures::opGlobalVisibility().
Referenced by clang::CIRGen::CIRGenVTables::createVTableInitializer(), emitGlobalVarDefinition(), and generateStringLiteral().
|
inline |
Definition at line 135 of file CIRGenModule.h.
References c, and staticLocalDeclMap.
Referenced by clang::CIRGen::CIRGenFunction::emitStaticVarDecl().
Definition at line 304 of file CIRGenModule.h.
References getLangOpts(), and getTriple().
Referenced by getAddrOfRTTIDescriptor().
bool CIRGenModule::supportsCOMDAT | ( | ) | const |
Definition at line 892 of file CIRGenModule.cpp.
References getTriple().
Referenced by createOrReplaceCXXRuntimeVariable(), generateStringLiteral(), getOrCreateStaticVarDecl(), and shouldBeInCOMDAT().
void CIRGenModule::updateCompletedType | ( | const clang::TagDecl * | td | ) |
Definition at line 933 of file CIRGenModule.cpp.
References clang::CIRGen::CIRGenTypes::updateCompletedType().
bool CIRGenModule::verifyModule | ( | ) | const |
Definition at line 2149 of file CIRGenModule.cpp.
llvm::StringMap<unsigned> clang::CIRGen::CIRGenModule::cgGlobalNames |
Definition at line 156 of file CIRGenModule.h.
Referenced by getUniqueGlobalName().
std::map<llvm::StringRef, clang::GlobalDecl> clang::CIRGen::CIRGenModule::deferredDecls |
This contains all the decls which have definitions but which are deferred for emission and therefore should only be output if they are actually used.
If a decl is in this, then it is known to have not been referenced yet.
Definition at line 268 of file CIRGenModule.h.
Referenced by emitGlobal(), emitTentativeDefinition(), and getOrCreateCIRFunction().
std::vector<clang::GlobalDecl> clang::CIRGen::CIRGenModule::deferredDeclsToEmit |
Definition at line 272 of file CIRGenModule.h.
Referenced by addDeferredDeclToEmit(), and emitDeferred().
mlir::Operation* clang::CIRGen::CIRGenModule::lastGlobalOp = nullptr |
llvm::DenseMap<const Decl *, cir::GlobalOp> clang::CIRGen::CIRGenModule::staticLocalDeclMap |
Definition at line 127 of file CIRGenModule.h.
Referenced by getStaticLocalDeclAddress(), and setStaticLocalDeclAddress().