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

Function hasPtr

ir/type.cpp:1481–1492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1479
1480
1481bool hasPtr(const Type &t) {
1482 if (t.isPtrType())
1483 return true;
1484
1485 if (auto agg = t.getAsAggregateType()) {
1486 for (unsigned i = 0, e = agg->numElementsConst(); i != e; ++i) {
1487 if (hasPtr(agg->getChild(i)))
1488 return true;
1489 }
1490 }
1491 return false;
1492}
1493
1494bool isNonPtrVector(const Type &t) {
1495 auto vty = dynamic_cast<const VectorType *>(&t);

Callers 5

has_nullptrFunction · 0.85
addFnCallMethod · 0.85
getByteAccessInfoMethod · 0.85
getMethod · 0.85

Calls 3

isPtrTypeMethod · 0.80
getAsAggregateTypeMethod · 0.80
numElementsConstMethod · 0.80

Tested by

no test coverage detected