Lines Matching refs:VD
115 std::optional<unsigned> Program::getGlobal(const ValueDecl *VD) { in getGlobal() argument
116 if (auto It = GlobalIndices.find(VD); It != GlobalIndices.end()) in getGlobal()
121 for (const Decl *P = VD->getPreviousDecl(); P; P = P->getPreviousDecl()) { in getGlobal()
130 GlobalIndices[VD] = *Index; in getGlobal()
141 std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD, in getOrCreateGlobal() argument
143 if (auto Idx = getGlobal(VD)) in getOrCreateGlobal()
146 if (auto Idx = createGlobal(VD, Init)) { in getOrCreateGlobal()
147 GlobalIndices[VD] = *Idx; in getOrCreateGlobal()
165 const auto *VD = cast<ValueDecl>(cast<const Decl *>(D)); in getOrCreateDummy() local
166 IsWeak = VD->isWeak(); in getOrCreateDummy()
167 QT = VD->getType(); in getOrCreateDummy()
201 std::optional<unsigned> Program::createGlobal(const ValueDecl *VD, in createGlobal() argument
204 bool IsWeak = VD->isWeak(); in createGlobal()
205 if (const auto *Var = dyn_cast<VarDecl>(VD)) { in createGlobal()
206 IsStatic = Context::shouldBeGloballyIndexed(VD); in createGlobal()
209 TemplateParamObjectDecl>(VD)) { in createGlobal()
220 createGlobal(VD, VD->getType(), IsStatic, IsExtern, IsWeak, Init)) { in createGlobal()
221 for (const Decl *P = VD; P; P = P->getPreviousDecl()) { in createGlobal()
223 if (P != VD) { in createGlobal()