]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Small tweak to expand_used_vars
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 11 Aug 2021 13:31:32 +0000 (15:31 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 11 Aug 2021 13:34:15 +0000 (15:34 +0200)
This completes the replacement of DECL_ATTRIBUTES (current_function_decl)
with the attribs local variable.

gcc/
* cfgexpand.c (expand_used_vars): Reuse attribs local variable.

gcc/cfgexpand.c

index 818328071db6e4b97c28670624c387d732b2be5e..03260b019e5685aee033bee9f21e29aea43647d6 100644 (file)
@@ -2294,22 +2294,19 @@ expand_used_vars (bitmap forced_stack_vars)
        if (gen_stack_protect_signal
            || cfun->calls_alloca
            || has_protected_decls
-           || lookup_attribute ("stack_protect",
-                                DECL_ATTRIBUTES (current_function_decl)))
+           || lookup_attribute ("stack_protect", attribs))
          create_stack_guard ();
        break;
 
       case SPCT_FLAG_DEFAULT:
        if (cfun->calls_alloca
            || has_protected_decls
-           || lookup_attribute ("stack_protect",
-                                DECL_ATTRIBUTES (current_function_decl)))
+           || lookup_attribute ("stack_protect", attribs))
          create_stack_guard ();
        break;
 
       case SPCT_FLAG_EXPLICIT:
-       if (lookup_attribute ("stack_protect",
-                             DECL_ATTRIBUTES (current_function_decl)))
+       if (lookup_attribute ("stack_protect", attribs))
          create_stack_guard ();
        break;