| 366 | namespace { |
| 367 | |
| 368 | string SummarizeArgs(const protobuf::RepeatedPtrField<OpDef::ArgDef>& args) { |
| 369 | string ret; |
| 370 | for (const OpDef::ArgDef& arg : args) { |
| 371 | if (!ret.empty()) strings::StrAppend(&ret, ", "); |
| 372 | strings::StrAppend(&ret, arg.name(), ":"); |
| 373 | if (arg.is_ref()) strings::StrAppend(&ret, "Ref("); |
| 374 | if (!arg.number_attr().empty()) { |
| 375 | strings::StrAppend(&ret, arg.number_attr(), "*"); |
| 376 | } |
| 377 | if (arg.type() != DT_INVALID) { |
| 378 | strings::StrAppend(&ret, DataTypeString(arg.type())); |
| 379 | } else { |
| 380 | strings::StrAppend(&ret, arg.type_attr()); |
| 381 | } |
| 382 | if (arg.is_ref()) strings::StrAppend(&ret, ")"); |
| 383 | } |
| 384 | return ret; |
| 385 | } |
| 386 | |
| 387 | } // namespace |
| 388 |
no test coverage detected