diff gcc/c-common.c @ 38:27e6f95b2c21

mearge hgtags
author e075725
date Tue, 05 Jan 2010 17:33:06 +0900
parents 60db277cbe4d 855418dad1a3
children 9907f3135723
line wrap: on
line diff
--- a/gcc/c-common.c	Tue Dec 22 20:49:36 2009 +0900
+++ b/gcc/c-common.c	Tue Jan 05 17:33:06 2010 +0900
@@ -8416,4 +8416,29 @@
     }
 }
 
+/* Record the types used by the current global variable declaration
+   being parsed, so that we can decide later to emit their debug info.
+   Those types are in types_used_by_cur_var_decl, and we are going to
+   store them in the types_used_by_vars_hash hash table.
+   DECL is the declaration of the global variable that has been parsed.  */
+
+void
+record_types_used_by_current_var_decl (tree decl)
+{
+  gcc_assert (decl && DECL_P (decl) && TREE_STATIC (decl));
+
+  if (types_used_by_cur_var_decl)
+    {
+      tree node;
+      for (node = types_used_by_cur_var_decl;
+	   node;
+	   node = TREE_CHAIN (node))
+      {
+	tree type = TREE_PURPOSE (node);
+	types_used_by_var_decl_insert (type, decl);
+      }
+      types_used_by_cur_var_decl = NULL;
+    }
+}
+
 #include "gt-c-common.h"