From patchwork Wed Dec 1 21:53:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 73913 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]) by ozlabs.org (Postfix) with SMTP id CB1A7B70AF for ; Thu, 2 Dec 2010 08:53:38 +1100 (EST) Received: (qmail 8188 invoked by alias); 1 Dec 2010 21:53:35 -0000 Received: (qmail 8173 invoked by uid 22791); 1 Dec 2010 21:53:33 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL, BAYES_50, TW_BJ, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Dec 2010 21:53:27 +0000 Received: from eggs.gnu.org ([140.186.70.92]:44608) by fencepost.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PNuc7-00019l-2e for gcc-patches@gnu.org; Wed, 01 Dec 2010 16:53:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNuc8-0000WF-0o for gcc-patches@gnu.org; Wed, 01 Dec 2010 16:53:25 -0500 Received: from smtp191.iad.emailsrvr.com ([207.97.245.191]:57852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNuc7-0000W3-Uj for gcc-patches@gnu.org; Wed, 01 Dec 2010 16:53:23 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp39.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 142FB9827E for ; Wed, 1 Dec 2010 16:53:23 -0500 (EST) Received: from dynamic12.wm-web.iad.mlsrvr.com (dynamic12.wm-web.iad1a.rsapps.net [192.168.2.219]) by smtp39.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 6CF7A981C7 for ; Wed, 1 Dec 2010 16:53:19 -0500 (EST) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic12.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 47FFA2168082 for ; Wed, 1 Dec 2010 16:53:19 -0500 (EST) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Wed, 1 Dec 2010 22:53:19 +0100 (CET) Date: Wed, 1 Dec 2010 22:53:19 +0100 (CET) Subject: ObjC/ObjC++: Tidy up #includes of objc-act.c From: "Nicola Pero" To: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain Message-ID: <1291240399.293516255@192.168.2.227> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-IsSubscribed: yes 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 This patch tidies up the list of #includes in objc-act.c. For each file, it adds an explanation of why it is included (as far as I could determine). A few files were not needed and I could remove the line that #included them (great). A few other files are implicitly #included by tree.h or c-tree.h etc. and I left them, commented out, but with a comment explaining what is happening. I guess it's kind of a trivial patch, but as I did the cleanup, I'd like to commit it. Ok to commit ? Thanks Index: objc-act.c =================================================================== --- objc-act.c (revision 167353) +++ objc-act.c (working copy) @@ -20,10 +20,10 @@ You should have received a copy of the GNU General along with GCC; see the file COPYING3. If not see . */ +/* Basic includes. */ #include "config.h" #include "system.h" #include "coretypes.h" -#include "tm.h" #include "tree.h" #ifdef OBJCPLUS @@ -33,30 +33,49 @@ along with GCC; see the file COPYING3. If not see #include "c-lang.h" #endif +/* Declarations of most functions in this file. */ #include "c-family/c-common.h" -#include "c-family/c-pragma.h" -#include "c-family/c-format.h" -#include "flags.h" + +/* For lang_hooks. */ #include "langhooks.h" + +/* Header associated with this file. */ #include "objc-act.h" -#include "input.h" -#include "function.h" + +/* For input_location. Already included by tree.h. */ +/* #include "input.h" */ + +/* For assemble_external(). */ #include "output.h" + +/* For warn_deprecated_use(), rest_of_decl_compilation(). */ #include "toplev.h" -#include "ggc.h" + +/* Already included by gimple.h. */ +/* #include "ggc.h" */ + +/* For debug_hooks, do_nothing_debug_hooks. */ #include "debug.h" + +/* For targetcm. */ #include "target.h" -#include "diagnostic-core.h" + +/* For warning(), error(), etc. Already included by c-tree.h or cp-tree.h. */ +/* #include "diagnostic-core.h" */ + +/* For _(). */ #include "intl.h" + +/* For cgraph_mark_needed_node(), cgraph_node(). */ #include "cgraph.h" + +/* For tree_stmt_iterator, append_to_statement_list(). */ #include "tree-iterator.h" -#include "hashtab.h" -#include "langhooks-def.h" -/* For default_tree_printer (). */ -#include "tree-pretty-print.h" +/* Already included by tree.h. */ +/* #include "hashtab.h" */ -/* For enum gimplify_status */ +/* For enum gimplify_status, gimplify_expr(), is_gimple_val(), etc. */ #include "gimple.h" #define OBJC_VOID_AT_END void_list_node Index: ChangeLog =================================================================== --- ChangeLog (revision 167353) +++ ChangeLog (working copy) @@ -1,3 +1,10 @@ +2010-12-01 Nicola Pero + + * objc-act.c: Do not include tm.h, c-family/c-pragma.h, + c-family/c-format.h, flags.h, input.h, function.h, gcc.h, + diagnostic-core.h, hashtab.h, langhooks-def.h and + tree-pretty-print.h. Updated comments for #includes. + 2010-11-30 Nicola Pero * objc-act.c (objc_build_volatilized_type): Removed.