MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / numPointerElements

Method numPointerElements

ir/type.cpp:1034–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032}
1033
1034unsigned AggregateType::numPointerElements() const {
1035 unsigned count = 0;
1036 for (unsigned i = 0; i < elements; ++i) {
1037 if (children[i]->isPtrType())
1038 count++;
1039 else if (auto aty = children[i]->getAsAggregateType())
1040 count += aty->numPointerElements();
1041 }
1042 return count;
1043}
1044
1045void AggregateType::printVal(ostream &os, const State &s, const expr &e) const {
1046 UNREACHABLE();

Callers 1

num_ptrsFunction · 0.80

Calls 2

isPtrTypeMethod · 0.80
getAsAggregateTypeMethod · 0.80

Tested by

no test coverage detected