MCPcopy Create free account
hub / github.com/Samsung/UTopia / updateFieldFlow

Method updateFieldFlow

lib/propanalysis/FilePathAnalyzer.cpp:166–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void FilePathAnalyzer::updateFieldFlow(ArgFlow &AF, std::vector<int> Indices) {
167 auto &A = AF.getLLVMArg();
168 auto *T = A.getType();
169 while (isa<PointerType>(T))
170 T = T->getPointerElementType();
171
172 auto *ST = dyn_cast_or_null<StructType>(T);
173 if (!ST)
174 return;
175
176 for (unsigned S = 0; S < ST->getNumElements(); ++S) {
177 Indices.push_back(S);
178 if (!Report.has(A, Indices)) {
179 Indices.pop_back();
180 continue;
181 }
182
183 AF.setStruct(ST);
184 auto &FF = AF.getOrCreateFieldFlow(S);
185 if (Report.get(A, Indices)) {
186 FF.setFilePathString();
187 }
188 updateFieldFlow(FF, Indices);
189 Indices.pop_back();
190 }
191}
192
193} // namespace ftg

Callers

nothing calls this directly

Calls 5

setStructMethod · 0.80
setFilePathStringMethod · 0.80
getTypeMethod · 0.45
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected