Lines Matching defs:CGM

134         CGM.getLLVMLinkageVarDefinition(&D, /*isConstant=*/false);
148 return CGM.getOpenCLRuntime().EmitWorkGroupLocalVarDecl(*this, D);
154 static std::string getStaticDeclName(CodeGenModule &CGM, const VarDecl &D) {
155 if (CGM.getLangOpts().CPlusPlus)
156 return CGM.getMangledName(&D).str();
165 ContextName = CGM.getMangledName(FD);
167 ContextName = CGM.getBlockMangledName(GlobalDecl(), BD);
285 llvm::Constant *Init = CGM.EmitConstantInit(D, this);
291 CGM.ErrorUnsupported(D.getInit(), "constant l-value expression");
309 GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(),
314 CGM.getContext().getTargetAddressSpace(D.getType()));
330 GV->setConstant(CGM.isTypeConstant(D.getType(), true));
348 llvm::Constant *addr = CGM.getOrCreateStaticVarDecl(D, Linkage);
373 CGM.AddGlobalAnnotations(&D, var);
379 CGM.addUsedGlobal(var);
390 CGM.setStaticLocalDeclAddress(&D, castedAddr);
392 CGM.getSanitizerMetadata()->reportGlobalToASan(var, D);
397 CGM.getCodeGenOpts().getDebugInfo() >= CodeGenOptions::LimitedDebugInfo) {
464 llvm::Value *F = CGF.CGM.getIntrinsic(llvm::Intrinsic::stackrestore);
916 if (CGM.getCodeGenOpts().OptimizationLevel == 0)
927 Builder.CreateCall(CGM.getLLVMLifetimeStartFn(), {SizeV, Addr});
935 Builder.CreateCall(CGM.getLLVMLifetimeEndFn(), {Size, Addr});
978 if (CGM.getCodeGenOpts().MergeAllConstants && !NRVO && !isByRef &&
979 CGM.isTypeConstant(Ty, true)) {
1044 uint64_t size = CGM.getDataLayout().getTypeAllocSize(allocaTy);
1059 llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::stacksave);
1089 if (CGM.getCodeGenOpts().getDebugInfo()
1204 constant = CGM.EmitConstantInit(D, this);
1235 CGM.getDataLayout().getTypeAllocSize(constant->getType()))) {
1247 std::string Name = getStaticDeclName(CGM, D);
1249 new llvm::GlobalVariable(CGM.getModule(), constant->getType(), true,
1406 llvm::Constant *F = CGM.GetAddrOfFunction(FD);
1409 const CGFunctionInfo &Info = CGM.getTypes().arrangeFunctionDeclaration(FD);
1812 if (CGM.getCodeGenOpts().OptimizationLevel == 0) {
1816 llvm::Value *Null = CGM.EmitNullConstant(D.getType());
1855 if (CGM.getCodeGenOpts().getDebugInfo()