| 64 | } |
| 65 | |
| 66 | Status CheckFeedFetchNameConflicts(const string& kind, |
| 67 | const std::set<string>& names) { |
| 68 | // We don't allow the feeds or fetches to contain both "foo" and "foo_data", |
| 69 | // since that will cause a collision in codegen symbols. |
| 70 | for (const string& name : names) { |
| 71 | const string name_data(name + "_data"); |
| 72 | if (names.find(name_data) != names.end()) { |
| 73 | return errors::InvalidArgument("conflicting ", kind, " name: ", name, |
| 74 | " and ", name_data); |
| 75 | } |
| 76 | } |
| 77 | return Status::OK(); |
| 78 | } |
| 79 | |
| 80 | // For graph `g`, copy all function call nodes' FunctionDef from `lookup_fld` to |
| 81 | // `fld`. This is to ensure that `fld` can instantiate FunctionDef of graph `g`. |
no test coverage detected