From patchwork Thu Dec 11 18:53:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 420238 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8D0811400A0 for ; Fri, 12 Dec 2014 06:29:42 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=S02DIwIGHlkWut4caWkPbW+pruDqmzWaKFTt2bAho9dkor Ox97jMKyjKSussSJ8L9oVLg8MyRa+IXQ8qvZgz3M5VOOX3PW28+3ED/ch/EDVVeB hc1BJk5n1P+37+KBmd9wUpOY0y4Q/u+8CkFHuVRKD22rpU+cs/f8d8KK/bt70= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=KX+WAKmRMCHyJmHTd6T1d+yCU4I=; b=qYOCO99+HLAkvpdg4Jlc ctdJzhoj8xIb18KIc9Rfynbav/sPhPT3SBxi91AOblwYmAbFUmQdsvtPBwNMJD7U AmSp7CvWiCWHnTvQQIDt9PocI5OezqFGIwZiQAz+6TtXq/xXHaK6UCRK8c8cqfV7 /CSGOS84fKOuNUbMRzlLMcM= Received: (qmail 15295 invoked by alias); 11 Dec 2014 19:29:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 15279 invoked by uid 89); 11 Dec 2014 19:29:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 11 Dec 2014 19:29:33 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBBJTREW023928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 11 Dec 2014 14:29:31 -0500 Received: from reynosa.quesejoda.com (vpn-54-227.rdu2.redhat.com [10.10.54.227]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBBIr8j8013341; Thu, 11 Dec 2014 13:53:09 -0500 Message-ID: <5489E814.6040805@redhat.com> Date: Thu, 11 Dec 2014 10:53:08 -0800 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: jason merrill , gcc-patches Subject: [patch] remove unused `depth' argument from dwarf2out.c Looks like `depth' is passed around and never used. OK for mainline? commit d1603304423bcb25c69d0f4bf51b142e07274275 Author: Aldy Hernandez Date: Thu Dec 11 10:51:04 2014 -0800 * dwarf2out.c (gen_lexical_block_die): Remove unused `depth' parameter. (gen_inlined_subroutine_die): Same. (gen_block_die): Same. (decls_for_scope): Same. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 34b327e..4c2ff8d 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3263,8 +3263,8 @@ static void gen_subprogram_die (tree, dw_die_ref); static void gen_variable_die (tree, tree, dw_die_ref); static void gen_const_die (tree, dw_die_ref); static void gen_label_die (tree, dw_die_ref); -static void gen_lexical_block_die (tree, dw_die_ref, int); -static void gen_inlined_subroutine_die (tree, dw_die_ref, int); +static void gen_lexical_block_die (tree, dw_die_ref); +static void gen_inlined_subroutine_die (tree, dw_die_ref); static void gen_field_die (tree, dw_die_ref); static void gen_ptr_to_mbr_type_die (tree, dw_die_ref); static dw_die_ref gen_compile_unit_die (const char *); @@ -3275,8 +3275,8 @@ static void gen_struct_or_union_type_die (tree, dw_die_ref, static void gen_subroutine_type_die (tree, dw_die_ref); static void gen_typedef_die (tree, dw_die_ref); static void gen_type_die (tree, dw_die_ref); -static void gen_block_die (tree, dw_die_ref, int); -static void decls_for_scope (tree, dw_die_ref, int); +static void gen_block_die (tree, dw_die_ref); +static void decls_for_scope (tree, dw_die_ref); static inline int is_redundant_typedef (const_tree); static bool is_naming_typedef_decl (const_tree); static inline dw_die_ref get_context_die (tree); @@ -18696,7 +18696,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) if (DECL_NAME (DECL_RESULT (decl))) gen_decl_die (DECL_RESULT (decl), NULL, subr_die); - decls_for_scope (outer_scope, subr_die, 0); + decls_for_scope (outer_scope, subr_die); if (call_arg_locations && !dwarf_strict) { @@ -19294,7 +19294,7 @@ add_high_low_attributes (tree stmt, dw_die_ref die) /* Generate a DIE for a lexical block. */ static void -gen_lexical_block_die (tree stmt, dw_die_ref context_die, int depth) +gen_lexical_block_die (tree stmt, dw_die_ref context_die) { dw_die_ref stmt_die = new_die (DW_TAG_lexical_block, context_die, stmt); @@ -19308,13 +19308,13 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die, int depth) if (! BLOCK_ABSTRACT (stmt) && TREE_ASM_WRITTEN (stmt)) add_high_low_attributes (stmt, stmt_die); - decls_for_scope (stmt, stmt_die, depth); + decls_for_scope (stmt, stmt_die); } /* Generate a DIE for an inlined subprogram. */ static void -gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die, int depth) +gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die) { tree decl; @@ -19346,7 +19346,7 @@ gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die, int depth) add_high_low_attributes (stmt, subr_die); add_call_src_coords_attributes (stmt, subr_die); - decls_for_scope (stmt, subr_die, depth); + decls_for_scope (stmt, subr_die); } } @@ -20240,7 +20240,7 @@ gen_type_die (tree type, dw_die_ref context_die) things which are local to the given block. */ static void -gen_block_die (tree stmt, dw_die_ref context_die, int depth) +gen_block_die (tree stmt, dw_die_ref context_die) { int must_output_die = 0; bool inlined_func; @@ -20259,7 +20259,7 @@ gen_block_die (tree stmt, dw_die_ref context_die, int depth) tree sub; for (sub = BLOCK_SUBBLOCKS (stmt); sub; sub = BLOCK_CHAIN (sub)) - gen_block_die (sub, context_die, depth + 1); + gen_block_die (sub, context_die); return; } @@ -20314,13 +20314,13 @@ gen_block_die (tree stmt, dw_die_ref context_die, int depth) the concrete instance of STMT got inlined, the later will lead to the generation of a DW_TAG_inlined_subroutine DIE. */ if (! BLOCK_ABSTRACT (stmt)) - gen_inlined_subroutine_die (stmt, context_die, depth); + gen_inlined_subroutine_die (stmt, context_die); } else - gen_lexical_block_die (stmt, context_die, depth); + gen_lexical_block_die (stmt, context_die); } else - decls_for_scope (stmt, context_die, depth); + decls_for_scope (stmt, context_die); } /* Process variable DECL (or variable with origin ORIGIN) within @@ -20352,7 +20352,7 @@ process_scope_var (tree stmt, tree decl, tree origin, dw_die_ref context_die) all of its sub-blocks. */ static void -decls_for_scope (tree stmt, dw_die_ref context_die, int depth) +decls_for_scope (tree stmt, dw_die_ref context_die) { tree decl; unsigned int i; @@ -20384,7 +20384,7 @@ decls_for_scope (tree stmt, dw_die_ref context_die, int depth) for (subblocks = BLOCK_SUBBLOCKS (stmt); subblocks != NULL; subblocks = BLOCK_CHAIN (subblocks)) - gen_block_die (subblocks, context_die, depth + 1); + gen_block_die (subblocks, context_die); } /* Is this a typedef we can avoid emitting? */