(sdbout_symbol, case FUNCTION_DECL): Use DECL_INITIAL
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 19 Dec 1995 00:08:11 +0000 (16:08 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 19 Dec 1995 00:08:11 +0000 (16:08 -0800)
instead of DECL_EXTERNAL to identify declarations.

From-SVN: r10805

gcc/sdbout.c

index 8fdb72c6ae2c3c4c4a53596931a38d033c0f0cb9..73beebac5e74ae915711b0b2ad8aa2b5a4dd552e 100644 (file)
@@ -691,7 +691,10 @@ sdbout_symbol (decl, local)
       context = decl_function_context (decl);
       if (context == current_function_decl)
        return;
-      if (DECL_EXTERNAL (decl))
+      /* Check DECL_INITIAL to distinguish declarations from definitions.
+        Don't output debug info here for declarations; they will have
+        a DECL_INITIAL value of 0.  */
+      if (! DECL_INITIAL (decl))
        return;
       if (GET_CODE (DECL_RTL (decl)) != MEM
          || GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF)