Lines Matching refs:VD
1418 if (const auto *VD = dyn_cast<VarDecl>(D)) in CollectTemplateParams() local
1419 V = CGM.GetAddrOfGlobalVar(VD); in CollectTemplateParams()
2639 void CGDebugInfo::collectVarDeclProps(const VarDecl *VD, llvm::DIFile *&Unit, in collectVarDeclProps() argument
2643 Unit = getOrCreateFile(VD->getLocation()); in collectVarDeclProps()
2644 LineNo = getLineNumber(VD->getLocation()); in collectVarDeclProps()
2646 setLocation(VD->getLocation()); in collectVarDeclProps()
2648 T = VD->getType(); in collectVarDeclProps()
2658 Name = VD->getName(); in collectVarDeclProps()
2659 if (VD->getDeclContext() && !isa<FunctionDecl>(VD->getDeclContext()) && in collectVarDeclProps()
2660 !isa<ObjCMethodDecl>(VD->getDeclContext())) in collectVarDeclProps()
2661 LinkageName = CGM.getMangledName(VD); in collectVarDeclProps()
2671 const DeclContext *DC = VD->isStaticDataMember() ? VD->getLexicalDeclContext() in collectVarDeclProps()
2672 : VD->getDeclContext(); in collectVarDeclProps()
2682 llvm::DIScope *Mod = getParentModuleOrNull(VD); in collectVarDeclProps()
2718 CGDebugInfo::getGlobalVariableForwardDeclaration(const VarDecl *VD) { in getGlobalVariableForwardDeclaration() argument
2721 SourceLocation Loc = VD->getLocation(); in getGlobalVariableForwardDeclaration()
2726 collectVarDeclProps(VD, Unit, Line, T, Name, LinkageName, DContext); in getGlobalVariableForwardDeclaration()
2729 !VD->isExternallyVisible(), nullptr, nullptr); in getGlobalVariableForwardDeclaration()
2732 std::make_tuple(cast<VarDecl>(VD->getCanonicalDecl())), in getGlobalVariableForwardDeclaration()
2754 else if (const auto *VD = dyn_cast<VarDecl>(D)) in getDeclarationOrDefinition() local
2755 return getGlobalVariableForwardDeclaration(VD); in getDeclarationOrDefinition()
3047 llvm::DIType *CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD, in EmitTypeForVarWithBlocksAttr() argument
3055 llvm::DIFile *Unit = getOrCreateFile(VD->getLocation()); in EmitTypeForVarWithBlocksAttr()
3056 QualType Type = VD->getType(); in EmitTypeForVarWithBlocksAttr()
3066 bool HasCopyAndDispose = CGM.getContext().BlockRequiresCopying(Type, VD); in EmitTypeForVarWithBlocksAttr()
3084 CharUnits Align = CGM.getContext().getDeclAlign(VD); in EmitTypeForVarWithBlocksAttr()
3106 FieldTy = DBuilder.createMemberType(Unit, VD->getName(), Unit, 0, FieldSize, in EmitTypeForVarWithBlocksAttr()
3119 void CGDebugInfo::EmitDeclare(const VarDecl *VD, llvm::Value *Storage, in EmitDeclare() argument
3124 if (VD->hasAttr<NoDebugAttr>()) in EmitDeclare()
3128 VD->isImplicit() || (isa<Decl>(VD->getDeclContext()) && in EmitDeclare()
3129 cast<Decl>(VD->getDeclContext())->isImplicit()); in EmitDeclare()
3132 Unit = getOrCreateFile(VD->getLocation()); in EmitDeclare()
3135 if (VD->hasAttr<BlocksAttr>()) in EmitDeclare()
3136 Ty = EmitTypeForVarWithBlocksAttr(VD, &XOffset); in EmitDeclare()
3138 Ty = getOrCreateType(VD->getType(), Unit); in EmitDeclare()
3149 Line = getLineNumber(VD->getLocation()); in EmitDeclare()
3150 Column = getColumnNumber(VD->getLocation()); in EmitDeclare()
3154 if (VD->isImplicit()) in EmitDeclare()
3161 if (isa<ImplicitParamDecl>(VD) && ArgNo && *ArgNo == 1) in EmitDeclare()
3165 !VD->getType()->isPointerType()) in EmitDeclare()
3170 StringRef Name = VD->getName(); in EmitDeclare()
3172 if (VD->hasAttr<BlocksAttr>()) { in EmitDeclare()
3187 ? DBuilder.createParameterVariable(Scope, VD->getName(), in EmitDeclare()
3189 : DBuilder.createAutoVariable(Scope, VD->getName(), Unit, in EmitDeclare()
3197 } else if (isa<VariableArrayType>(VD->getType())) in EmitDeclare()
3199 } else if (const RecordType *RT = dyn_cast<RecordType>(VD->getType())) { in EmitDeclare()
3247 void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD, in EmitDeclareOfAutoVariable() argument
3251 EmitDeclare(VD, Storage, llvm::None, Builder); in EmitDeclareOfAutoVariable()
3263 const VarDecl *VD, llvm::Value *Storage, CGBuilderTy &Builder, in EmitDeclareOfBlockDeclRefVariable() argument
3270 if (VD->hasAttr<NoDebugAttr>()) in EmitDeclareOfBlockDeclRefVariable()
3273 bool isByRef = VD->hasAttr<BlocksAttr>(); in EmitDeclareOfBlockDeclRefVariable()
3276 llvm::DIFile *Unit = getOrCreateFile(VD->getLocation()); in EmitDeclareOfBlockDeclRefVariable()
3279 Ty = EmitTypeForVarWithBlocksAttr(VD, &XOffset); in EmitDeclareOfBlockDeclRefVariable()
3281 Ty = getOrCreateType(VD->getType(), Unit); in EmitDeclareOfBlockDeclRefVariable()
3285 if (isa<ImplicitParamDecl>(VD) && VD->getName() == "self") in EmitDeclareOfBlockDeclRefVariable()
3286 Ty = CreateSelfType(VD->getType(), Ty); in EmitDeclareOfBlockDeclRefVariable()
3289 unsigned Line = getLineNumber(VD->getLocation()); in EmitDeclareOfBlockDeclRefVariable()
3290 unsigned Column = getColumnNumber(VD->getLocation()); in EmitDeclareOfBlockDeclRefVariable()
3296 ->getElementOffset(blockInfo.getCapture(VD).getIndex())); in EmitDeclareOfBlockDeclRefVariable()
3319 cast<llvm::DILocalScope>(LexicalBlockStack.back()), VD->getName(), Unit, in EmitDeclareOfBlockDeclRefVariable()
3332 void CGDebugInfo::EmitDeclareOfArgVariable(const VarDecl *VD, llvm::Value *AI, in EmitDeclareOfArgVariable() argument
3336 EmitDeclare(VD, AI, ArgNo, Builder); in EmitDeclareOfArgVariable()
3577 void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, in EmitGlobalVariable() argument
3580 if (VD->hasAttr<NoDebugAttr>()) in EmitGlobalVariable()
3583 llvm::DIFile *Unit = getOrCreateFile(VD->getLocation()); in EmitGlobalVariable()
3584 StringRef Name = VD->getName(); in EmitGlobalVariable()
3585 llvm::DIType *Ty = getOrCreateType(VD->getType(), Unit); in EmitGlobalVariable()
3586 if (const EnumConstantDecl *ECD = dyn_cast<EnumConstantDecl>(VD)) { in EmitGlobalVariable()
3597 if (isa<FunctionDecl>(VD->getDeclContext())) in EmitGlobalVariable()
3599 VD = cast<ValueDecl>(VD->getCanonicalDecl()); in EmitGlobalVariable()
3600 auto *VarD = cast<VarDecl>(VD); in EmitGlobalVariable()
3613 llvm::DIScope *DContext = getDeclContextDescriptor(VD); in EmitGlobalVariable()
3615 auto &GV = DeclCache[VD]; in EmitGlobalVariable()
3619 DContext, Name, StringRef(), Unit, getLineNumber(VD->getLocation()), Ty, in EmitGlobalVariable()