Lines Matching refs:VD
109 std::optional<unsigned> Program::getGlobal(const ValueDecl *VD) { in getGlobal() argument
110 if (auto It = GlobalIndices.find(VD); It != GlobalIndices.end()) in getGlobal()
115 for (const Decl *P = VD->getPreviousDecl(); P; P = P->getPreviousDecl()) { in getGlobal()
124 GlobalIndices[VD] = *Index; in getGlobal()
135 std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD, in getOrCreateGlobal() argument
137 if (auto Idx = getGlobal(VD)) in getOrCreateGlobal()
140 if (auto Idx = createGlobal(VD, Init)) { in getOrCreateGlobal()
141 GlobalIndices[VD] = *Idx; in getOrCreateGlobal()
147 std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *VD) { in getOrCreateDummy() argument
149 if (auto It = DummyVariables.find(VD); It != DummyVariables.end()) in getOrCreateDummy()
152 QualType QT = VD->getType(); in getOrCreateDummy()
158 Desc = createDescriptor(VD, *T, std::nullopt, true, false); in getOrCreateDummy()
160 Desc = createDescriptor(VD, QT.getTypePtr(), std::nullopt, true, false); in getOrCreateDummy()
162 Desc = allocateDescriptor(VD); in getOrCreateDummy()
178 DummyVariables[VD] = I; in getOrCreateDummy()
182 std::optional<unsigned> Program::createGlobal(const ValueDecl *VD, in createGlobal() argument
185 if (const auto *Var = dyn_cast<VarDecl>(VD)) { in createGlobal()
186 IsStatic = Context::shouldBeGloballyIndexed(VD); in createGlobal()
189 TemplateParamObjectDecl>(VD)) { in createGlobal()
196 if (auto Idx = createGlobal(VD, VD->getType(), IsStatic, IsExtern, Init)) { in createGlobal()
197 for (const Decl *P = VD; P; P = P->getPreviousDecl()) in createGlobal()