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

Function agg_str

ir/value.cpp:132–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130
131
132static string agg_str(const Type &ty, vector<Value*> &vals) {
133 auto agg = ty.getAsAggregateType();
134 string r = "{ ";
135 unsigned j = 0;
136 for (unsigned i = 0, e = agg->numElementsConst(); i != e; ++i) {
137 if (i != 0)
138 r += ", ";
139 if (agg->isPadding(i))
140 r += "[padding]";
141 else
142 r += vals[j++]->getName();
143 }
144 return r + " }";
145}
146
147AggregateValue::AggregateValue(Type &type, vector<Value*> &&vals)
148 : Value(type, agg_str(type, vals)), vals(std::move(vals)) {}

Callers 2

AggregateValueMethod · 0.85
rauwMethod · 0.85

Calls 3

getAsAggregateTypeMethod · 0.80
numElementsConstMethod · 0.80
isPaddingMethod · 0.80

Tested by

no test coverage detected