Lines Matching defs:CGM

129         CGM.getLLVMLinkageVarDefinition(&D, /*isConstant=*/false);
143 return CGM.getOpenCLRuntime().EmitWorkGroupLocalVarDecl(*this, D);
151 CodeGenModule &CGM = CGF.CGM;
154 return CGM.getMangledName(&D).str();
162 ContextName = CGM.getBlockMangledName(GlobalDecl(), BD);
166 ContextName = CGM.getMangledName(FD);
185 Name = CGM.getMangledName(&D);
189 llvm::Type *LTy = CGM.getTypes().ConvertTypeForMem(Ty);
191 CGM.GetGlobalVarAddressSpace(&D, CGM.getContext().getTargetAddressSpace(Ty));
193 new llvm::GlobalVariable(CGM.getModule(), LTy,
195 CGM.EmitNullConstant(D.getType()), Name, nullptr,
199 CGM.setGlobalVisibility(GV, &D);
202 CGM.setTLSMode(GV, D);
212 unsigned ExpectedAddrSpace = CGM.getContext().getTargetAddressSpace(Ty);
236 llvm::Constant *Init = CGM.EmitConstantInit(D, this);
242 CGM.ErrorUnsupported(D.getInit(), "constant l-value expression");
260 GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(),
265 CGM.getContext().getTargetAddressSpace(D.getType()));
280 GV->setConstant(CGM.isTypeConstant(D.getType(), true));
302 CGM.getStaticLocalDeclAddress(&D);
310 CGM.setStaticLocalDeclAddress(&D, addr);
330 CGM.AddGlobalAnnotations(&D, var);
336 CGM.addUsedGlobal(var);
346 CGM.setStaticLocalDeclAddress(&D, castedAddr);
348 CGM.reportGlobalToASan(var, D.getLocation());
353 CGM.getCodeGenOpts().getDebugInfo() >= CodeGenOptions::LimitedDebugInfo) {
419 llvm::Value *F = CGF.CGM.getIntrinsic(llvm::Intrinsic::stackrestore);
482 CGF.Builder.CreateCall2(CGF.CGM.getLLVMLifetimeEndFn(),
808 if (CGF.CGM.getCodeGenOpts().OptimizationLevel == 0)
868 if (CGM.getCodeGenOpts().MergeAllConstants && !NRVO && !isByRef &&
869 CGM.isTypeConstant(Ty, true)) {
922 uint64_t size = CGM.getDataLayout().getTypeAllocSize(LTy);
928 Builder.CreateCall2(CGM.getLLVMLifetimeStartFn(), sizeV, castAddr)
941 llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::stacksave);
974 if (CGM.getCodeGenOpts().getDebugInfo()
1090 constant = CGM.EmitConstantInit(D, this);
1121 CGM.getDataLayout().getTypeAllocSize(constant->getType()))) {
1134 new llvm::GlobalVariable(CGM.getModule(), constant->getType(), true,
1292 llvm::Constant *F = CGM.GetAddrOfFunction(FD);
1295 const CGFunctionInfo &Info = CGM.getTypes().arrangeFunctionDeclaration(FD);
1625 if (CGM.getCodeGenOpts().OptimizationLevel == 0) {
1636 if (CGM.getCodeGenOpts().getDebugInfo()
1698 if (CGM.getCodeGenOpts().OptimizationLevel == 0) {
1702 llvm::Value *Null = CGM.EmitNullConstant(D.getType());
1743 if (CGM.getCodeGenOpts().getDebugInfo()