OSDN Git Service

* optimize.c (maybe_clone_body): Remove DECL_INLINE.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jul 2008 10:49:30 +0000 (10:49 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jul 2008 10:49:30 +0000 (10:49 +0000)
* decl.c (duplicate_decls): Likewise.
(grokfndecl): Likewise.
(start_method): Likewise.
* method.c (make_thunk, make_alias_for, implicitly_declare_fn):
Likewise.
* pt.c (register_specialization, regenerate_decl_from_template):
Likewise.
* decl2.c (grokfield): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138236 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/method.c
gcc/cp/optimize.c
gcc/cp/pt.c

index b441084..6fe401a 100644 (file)
@@ -1,3 +1,15 @@
+2008-07-29  Jan Hubicka  <jh@suse.cz>
+
+       * optimize.c (maybe_clone_body): Remove DECL_INLINE.
+       * decl.c (duplicate_decls): Likewise.
+       (grokfndecl): Likewise.
+       (start_method): Likewise.
+       * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
+       Likewise.
+       * pt.c (register_specialization, regenerate_decl_from_template):
+       Likewise.
+       * decl2.c (grokfield): Likewise.
+
 2008-07-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        PR 34985
index 248b9b7..1ed98ee 100644 (file)
@@ -1652,15 +1652,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
              && DECL_INITIAL (new_result))
            {
              if (DECL_INITIAL (old_result))
-               {
-                 DECL_INLINE (old_result) = 0;
-                 DECL_UNINLINABLE (old_result) = 1;
-               }
+               DECL_UNINLINABLE (old_result) = 1;
              else
-               {
-                 DECL_INLINE (old_result) = DECL_INLINE (new_result);
-                 DECL_UNINLINABLE (old_result) = DECL_UNINLINABLE (new_result);
-               }
+               DECL_UNINLINABLE (old_result) = DECL_UNINLINABLE (new_result);
              DECL_EXTERNAL (old_result) = DECL_EXTERNAL (new_result);
              DECL_NOT_REALLY_EXTERN (old_result)
                = DECL_NOT_REALLY_EXTERN (new_result);
@@ -1674,8 +1668,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
            }
          else
            {
-             DECL_INLINE (old_result)
-               |= DECL_INLINE (new_result);
              DECL_DECLARED_INLINE_P (old_result)
                |= DECL_DECLARED_INLINE_P (new_result);
              DECL_DISREGARD_INLINE_LIMITS (old_result)
@@ -1949,7 +1941,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
          /* Never inline re-defined extern inline functions.
             FIXME: this could be better handled by keeping both
             function as separate declarations.  */
-         DECL_INLINE (newdecl) = 0;
          DECL_UNINLINABLE (newdecl) = 1;
        }
       else
@@ -1959,12 +1950,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
 
          DECL_DECLARED_INLINE_P (newdecl) |= DECL_DECLARED_INLINE_P (olddecl);
 
-         /* If either decl says `inline', this fn is inline, unless
-            its definition was passed already.  */
-         if (DECL_INLINE (newdecl) && DECL_INITIAL (olddecl) == NULL_TREE)
-           DECL_INLINE (olddecl) = 1;
-         DECL_INLINE (newdecl) = DECL_INLINE (olddecl);
-
          DECL_UNINLINABLE (newdecl) = DECL_UNINLINABLE (olddecl)
            = (DECL_UNINLINABLE (newdecl) || DECL_UNINLINABLE (olddecl));
 
@@ -6649,11 +6634,6 @@ grokfndecl (tree ctype,
   /* If the declaration was declared inline, mark it as such.  */
   if (inlinep)
     DECL_DECLARED_INLINE_P (decl) = 1;
-  /* We inline functions that are explicitly declared inline, or, when
-     the user explicitly asks us to, all functions.  */
-  if (DECL_DECLARED_INLINE_P (decl)
-      || (!DECL_INLINE (decl) && funcdef_flag))
-    DECL_INLINE (decl) = 1;
 
   DECL_EXTERNAL (decl) = 1;
   if (quals && TREE_CODE (type) == FUNCTION_TYPE)
@@ -12138,8 +12118,6 @@ start_method (cp_decl_specifier_seq *declspecs,
   check_template_shadow (fndecl);
 
   DECL_DECLARED_INLINE_P (fndecl) = 1;
-  if (flag_default_inline)
-    DECL_INLINE (fndecl) = 1;
 
   /* We process method specializations in finish_struct_1.  */
   if (processing_template_decl && !DECL_TEMPLATE_SPECIALIZATION (fndecl))
index 20b0826..05f75f7 100644 (file)
@@ -837,7 +837,6 @@ grokfield (const cp_declarator *declarator,
                  DECL_DEFAULTED_FN (value) = 1;
                  DECL_INITIALIZED_IN_CLASS_P (value) = 1;
                  DECL_DECLARED_INLINE_P (value) = 1;
-                 DECL_INLINE (value) = 1;
                }
            }
          else if (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE)
@@ -2702,7 +2701,6 @@ start_static_storage_duration_function (unsigned count)
                               type);
   TREE_PUBLIC (ssdf_decl) = 0;
   DECL_ARTIFICIAL (ssdf_decl) = 1;
-  DECL_INLINE (ssdf_decl) = 1;
 
   /* Put this function in the list of functions to be called from the
      static constructors and destructors.  */
index f3d23eb..b215d2a 100644 (file)
@@ -155,7 +155,6 @@ make_thunk (tree function, bool this_adjusting,
   DECL_NO_STATIC_CHAIN (thunk) = 1;
   /* The THUNK is not a pending inline, even if the FUNCTION is.  */
   DECL_PENDING_INLINE_P (thunk) = 0;
-  DECL_INLINE (thunk) = 0;
   DECL_DECLARED_INLINE_P (thunk) = 0;
   /* Nor has it been deferred.  */
   DECL_DEFERRED_FN (thunk) = 0;
@@ -281,7 +280,6 @@ make_alias_for (tree function, tree newid)
   DECL_ARTIFICIAL (alias) = 1;
   DECL_NO_STATIC_CHAIN (alias) = 1;
   DECL_PENDING_INLINE_P (alias) = 0;
-  DECL_INLINE (alias) = 0;
   DECL_DECLARED_INLINE_P (alias) = 0;
   DECL_DEFERRED_FN (alias) = 0;
   DECL_USE_TEMPLATE (alias) = 0;
@@ -1111,7 +1109,6 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p)
   DECL_DEFAULTED_FN (fn) = 1;
   DECL_NOT_REALLY_EXTERN (fn) = 1;
   DECL_DECLARED_INLINE_P (fn) = 1;
-  DECL_INLINE (fn) = 1;
   gcc_assert (!TREE_USED (fn));
 
   /* Restore PROCESSING_TEMPLATE_DECL.  */
index ed43b43..8c7b9e8 100644 (file)
@@ -138,7 +138,6 @@ maybe_clone_body (tree fn)
 
       /* Update CLONE's source position information to match FN's.  */
       DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn);
-      DECL_INLINE (clone) = DECL_INLINE (fn);
       DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn);
       DECL_COMDAT (clone) = DECL_COMDAT (fn);
       DECL_WEAK (clone) = DECL_WEAK (fn);
index b47ee5e..04fd29b 100644 (file)
@@ -1289,12 +1289,8 @@ register_specialization (tree spec, tree tmpl, tree args, bool is_friend)
                to the primary function; now copy the inline bits to
                the various clones.  */
              FOR_EACH_CLONE (clone, fn)
-               {
-                 DECL_DECLARED_INLINE_P (clone)
-                   = DECL_DECLARED_INLINE_P (fn);
-                 DECL_INLINE (clone)
-                   = DECL_INLINE (fn);
-               }
+               DECL_DECLARED_INLINE_P (clone)
+                 = DECL_DECLARED_INLINE_P (fn);
              check_specialization_namespace (fn);
 
              return fn;
@@ -14921,8 +14917,6 @@ regenerate_decl_from_template (tree decl, tree tmpl)
       if (DECL_DECLARED_INLINE_P (code_pattern)
          && !DECL_DECLARED_INLINE_P (decl))
        DECL_DECLARED_INLINE_P (decl) = 1;
-      if (DECL_INLINE (code_pattern) && !DECL_INLINE (decl))
-       DECL_INLINE (decl) = 1;
     }
   else if (TREE_CODE (decl) == VAR_DECL)
     DECL_INITIAL (decl) =