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

Method updateFieldFlow

lib/propanalysis/DirectionAnalyzer.cpp:258–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258void DirectionAnalyzer::updateFieldFlow(ArgFlow &AF, std::vector<int> Indices) {
259 auto &A = AF.getLLVMArg();
260 auto *T = A.getType();
261 while (isa<llvm::PointerType>(T))
262 T = T->getPointerElementType();
263
264 auto *ST = dyn_cast_or_null<llvm::StructType>(T);
265 if (!ST)
266 return;
267
268 for (unsigned S = 0; S < ST->getNumElements(); ++S) {
269 Indices.push_back(S);
270 if (Report->has(A, Indices)) {
271 AF.setStruct(ST);
272 auto &FF = AF.getOrCreateFieldFlow(S);
273 FF.setArgDir(Report->get(A, Indices));
274 updateFieldFlow(FF, Indices);
275 }
276 Indices.pop_back();
277 }
278}
279
280void DirectionAnalyzer::updateDefault(const llvm::Module &M) {
281 if (!Report)

Callers

nothing calls this directly

Calls 5

setStructMethod · 0.80
setArgDirMethod · 0.80
getTypeMethod · 0.45
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected