Auto-generate files after cl/625324587
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c
index 626d988..b0e40d8 100644
--- a/ruby/ext/google/protobuf_c/ruby-upb.c
+++ b/ruby/ext/google/protobuf_c/ruby-upb.c
@@ -14142,6 +14142,17 @@
return f->ext_layouts[i];
}
+// Note: Import cycles are not allowed so this will terminate.
+bool upb_FileDef_Resolves(const upb_FileDef* f, const char* path) {
+ if (!strcmp(f->name, path)) return true;
+
+ for (int i = 0; i < upb_FileDef_PublicDependencyCount(f); i++) {
+ const upb_FileDef* dep = upb_FileDef_PublicDependency(f, i);
+ if (upb_FileDef_Resolves(dep, path)) return true;
+ }
+ return false;
+}
+
static char* strviewdup(upb_DefBuilder* ctx, upb_StringView view) {
char* ret = upb_strdup2(view.data, view.size, _upb_DefBuilder_Arena(ctx));
if (!ret) _upb_DefBuilder_OomErr(ctx);
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h
index b97fee3..71130fa 100755
--- a/ruby/ext/google/protobuf_c/ruby-upb.h
+++ b/ruby/ext/google/protobuf_c/ruby-upb.h
@@ -11968,6 +11968,9 @@
const upb_FileDef* upb_FileDef_WeakDependency(const upb_FileDef* f, int i);
int upb_FileDef_WeakDependencyCount(const upb_FileDef* f);
+// Returns whether |symbol| is transitively included by |f|
+bool upb_FileDef_Resolves(const upb_FileDef* f, const char* symbol);
+
#ifdef __cplusplus
} /* extern "C" */
#endif