Lines Matching refs:VD
105 std::optional<unsigned> Program::getGlobal(const ValueDecl *VD) { in getGlobal() argument
106 auto It = GlobalIndices.find(VD); in getGlobal()
112 for (const Decl *P = VD; P; P = P->getPreviousDecl()) { in getGlobal()
122 GlobalIndices[VD] = *Index; in getGlobal()
129 std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD, in getOrCreateGlobal() argument
131 if (auto Idx = getGlobal(VD)) in getOrCreateGlobal()
134 if (auto Idx = createGlobal(VD, Init)) { in getOrCreateGlobal()
135 GlobalIndices[VD] = *Idx; in getOrCreateGlobal()
141 std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *VD) { in getOrCreateDummy() argument
143 if (auto It = DummyParams.find(VD); It != DummyParams.end()) in getOrCreateDummy()
147 Descriptor *Desc = allocateDescriptor(VD, std::nullopt); in getOrCreateDummy()
156 DummyParams[VD] = I; in getOrCreateDummy()
160 std::optional<unsigned> Program::createGlobal(const ValueDecl *VD, in createGlobal() argument
162 assert(!getGlobal(VD)); in createGlobal()
164 if (const auto *Var = dyn_cast<VarDecl>(VD)) { in createGlobal()
165 IsStatic = Context::shouldBeGloballyIndexed(VD); in createGlobal()
167 } else if (isa<UnnamedGlobalConstantDecl>(VD)) { in createGlobal()
174 if (auto Idx = createGlobal(VD, VD->getType(), IsStatic, IsExtern, Init)) { in createGlobal()
175 for (const Decl *P = VD; P; P = P->getPreviousDecl()) in createGlobal()