Used for analyze ArrayLen First tracking the value used as array index (findRelatedField) then if the value is related to Argument/Struct Field, collect the value(collectRelatedLengthField) The value will has the attriube as ArrayLen
| 314 | // collect the value(collectRelatedLengthField) |
| 315 | // The value will has the attriube as ArrayLen |
| 316 | void ArgFlow::collectRelatedLengthField(Value &V) { |
| 317 | SmallSet<Value *, 8> Visited; |
| 318 | int FieldNum = findRelatedField(V, Visited, FDInfo->Parent); |
| 319 | if (FieldNum >= 0) |
| 320 | FDInfo->SizeFields.insert(FieldNum); |
| 321 | } |
| 322 | |
| 323 | /* |
| 324 | * Trace backward using use-def chains until we reach argument definition(s). |