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

Method add

lib/propanalysis/ArrayAnalysisReport.cpp:30–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void ArrayAnalysisReport::add(ArgFlow &AF, std::vector<int> Indices) {
31 auto &A = AF.getLLVMArg();
32 int Result = NO_ARRAY;
33 if (AF.isArray()) {
34 Result = ARRAY_NOLEN;
35 auto FI = AF.getFieldInfo();
36 if (FI) {
37 if (FI->SizeFields.size() > 0)
38 Result = *FI->SizeFields.begin();
39 } else if (AF.hasLenRelatedArg())
40 Result = AF.getLenRelatedArgNo();
41 }
42 set(A, Result, Indices);
43
44 auto SI = AF.getStructInfo();
45 if (!SI)
46 return;
47
48 for (auto Iter : SI->FieldResults) {
49 if (!Iter.second)
50 continue;
51
52 Indices.push_back(Iter.first);
53 add(*Iter.second, Indices);
54 Indices.pop_back();
55 }
56}
57
58} // namespace ftg

Callers

nothing calls this directly

Calls 7

getFieldInfoMethod · 0.80
sizeMethod · 0.80
beginMethod · 0.80
hasLenRelatedArgMethod · 0.80
getLenRelatedArgNoMethod · 0.80
getStructInfoMethod · 0.80
isArrayMethod · 0.45

Tested by

no test coverage detected