clang 23.0.0git
CIRGenModule.cpp File Reference
#include "CIRGenModule.h"
#include "CIRGenCUDARuntime.h"
#include "CIRGenCXXABI.h"
#include "CIRGenConstantEmitter.h"
#include "CIRGenFunction.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTLambda.h"
#include "clang/AST/Attrs.inc"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclOpenACC.h"
#include "clang/AST/GlobalDecl.h"
#include "clang/AST/RecordLayout.h"
#include "clang/Basic/DiagnosticFrontend.h"
#include "clang/Basic/SourceManager.h"
#include "clang/CIR/Dialect/IR/CIRAttrs.h"
#include "clang/CIR/Dialect/IR/CIRDialect.h"
#include "clang/CIR/Dialect/IR/CIROpsEnums.h"
#include "clang/CIR/Dialect/IR/CIRTypes.h"
#include "clang/CIR/Interfaces/CIROpInterfaces.h"
#include "clang/CIR/MissingFeatures.h"
#include "CIRGenFunctionInfo.h"
#include "TargetInfo.h"
#include "mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Verifier.h"
#include <algorithm>

Go to the source code of this file.

Functions

static CIRGenCXXABIcreateCXXABI (CIRGenModule &cgm)
template<typename AttrT>
static bool hasImplicitAttr (const ValueDecl *decl)
static void setLinkageForGV (cir::GlobalOp &gv, const NamedDecl *nd)
static llvm::SmallVector< int64_t > indexesOfArrayAttr (mlir::ArrayAttr indexes)
static bool isViewOnGlobal (cir::GlobalOp glob, cir::GlobalViewAttr view)
static cir::GlobalViewAttr createNewGlobalView (CIRGenModule &cgm, cir::GlobalOp newGlob, cir::GlobalViewAttr attr, mlir::Type oldTy)
static mlir::Attribute getNewInitValue (CIRGenModule &cgm, cir::GlobalOp newGlob, mlir::Type oldTy, mlir::Attribute oldInit)
static bool shouldBeInCOMDAT (CIRGenModule &cgm, const Decl &d)
static bool isVarDeclStrongDefinition (const ASTContext &astContext, CIRGenModule &cgm, const VarDecl *vd, bool noCommon)
static cir::GlobalOp generateStringLiteral (mlir::Location loc, mlir::TypedAttr c, cir::GlobalLinkageKind lt, CIRGenModule &cgm, StringRef globalName, CharUnits alignment)
static std::string getMangledNameImpl (CIRGenModule &cgm, GlobalDecl gd, const NamedDecl *nd)
static FunctionDeclcreateOpenACCBindTempFunction (ASTContext &ctx, const IdentifierInfo *bindName, const FunctionDecl *protoFunc)
static bool shouldAssumeDSOLocal (const CIRGenModule &cgm, cir::CIRGlobalValueInterface gv)
static bool hasUnwindExceptions (const LangOptions &langOpts)
 Determines whether the language options require us to model unwind exceptions.
static cir::CtorKind getCtorKindFromDecl (const CXXConstructorDecl *ctor)
static cir::AssignKind getAssignKindFromDecl (const CXXMethodDecl *method)
static void setWindowsItaniumDLLImport (CIRGenModule &cgm, bool isLocal, cir::FuncOp funcOp, StringRef name)

Function Documentation

◆ createCXXABI()

◆ createNewGlobalView()

◆ createOpenACCBindTempFunction()

◆ generateStringLiteral()

◆ getAssignKindFromDecl()

cir::AssignKind getAssignKindFromDecl ( const CXXMethodDecl * method)
static

◆ getCtorKindFromDecl()

◆ getMangledNameImpl()

◆ getNewInitValue()

◆ hasImplicitAttr()

template<typename AttrT>
bool hasImplicitAttr ( const ValueDecl * decl)
static

◆ hasUnwindExceptions()

bool hasUnwindExceptions ( const LangOptions & langOpts)
static

Determines whether the language options require us to model unwind exceptions.

We treat -fexceptions as mandating this except under the fragile ObjC ABI with only ObjC exceptions enabled. This means, for example, that C with -fexceptions enables this.

Definition at line 2605 of file CIRGenModule.cpp.

References clang::ObjCRuntime::hasUnwindExceptions(), and clang::LangOptions::ObjCRuntime.

Referenced by clang::CIRGen::CIRGenModule::setCIRFunctionAttributesForDefinition(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().

◆ indexesOfArrayAttr()

llvm::SmallVector< int64_t > indexesOfArrayAttr ( mlir::ArrayAttr indexes)
static

Definition at line 737 of file CIRGenModule.cpp.

Referenced by createNewGlobalView().

◆ isVarDeclStrongDefinition()

◆ isViewOnGlobal()

bool isViewOnGlobal ( cir::GlobalOp glob,
cir::GlobalViewAttr view )
static

Definition at line 746 of file CIRGenModule.cpp.

Referenced by createNewGlobalView().

◆ setLinkageForGV()

◆ setWindowsItaniumDLLImport()

◆ shouldAssumeDSOLocal()

◆ shouldBeInCOMDAT()