Replace the usage of cc_info.debug_context with _debug_context

This reduces the regression that would've been caused by Starlarkification.

PiperOrigin-RevId: 800058741
Change-Id: I8838af3b3cea91f60e35162f4bc0ab766889f2ab
diff --git a/cc/common/cc_helper.bzl b/cc/common/cc_helper.bzl
index c3af921..dac708b 100644
--- a/cc/common/cc_helper.bzl
+++ b/cc/common/cc_helper.bzl
@@ -130,7 +130,10 @@
     debug_context = cc_common.create_debug_context(compilation_outputs)
     debug_contexts = []
     for dep_cc_info in dep_cc_infos:
-        debug_contexts.append(dep_cc_info.debug_context())
+        if hasattr(dep_cc_info, "_debug_context"):
+            debug_contexts.append(dep_cc_info._debug_context)
+        else:
+            debug_contexts.append(dep_cc_info.debug_context())
     debug_contexts.append(debug_context)
 
     return cc_common.merge_debug_context(debug_contexts)