From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115063 invoked by alias); 8 May 2015 21:47:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 115051 invoked by uid 89); 8 May 2015 21:47:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD,UPPERCASE_50_75 autolearn=no 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; Fri, 08 May 2015 21:47:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t48LlkBQ021905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 8 May 2015 17:47:46 -0400 Received: from localhost.localdomain (ovpn-113-143.phx2.redhat.com [10.3.113.143]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t48Llj1h007458; Fri, 8 May 2015 17:47:45 -0400 Message-ID: <554D2F01.7020901@redhat.com> Date: Fri, 08 May 2015 21:47:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: David Malcolm CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 2/4 v2: part 2] libcpp: Replace macro usage with C++ constructs References: <5547C538.5000606@redhat.com> <1430850074-40522-1-git-send-email-dmalcolm@redhat.com> <1430850074-40522-3-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1430850074-40522-3-git-send-email-dmalcolm@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00762.txt.bz2 On 05/05/2015 12:21 PM, David Malcolm wrote: > libcpp/ChangeLog: > * include/line-map.h (MAX_SOURCE_LOCATION): Convert from a macro > to a const source_location. > (RESERVED_LOCATION_COUNT): Likewise. > (linemap_check_ordinary): Convert from a macro to a pair of inline > functions, for const/non-const arguments. > (MAP_START_LOCATION): Likewise. > (ORDINARY_MAP_STARTING_LINE_NUMBER): Likewise. > (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise. > (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise. > (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Convert from a macro to a > pair of inline functions, for const/non-const arguments, where the > latter is named... > (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): New function. > (ORDINARY_MAP_FILE_NAME): Convert from a macro to a pair of inline > functions, for const/non-const arguments. > (MACRO_MAP_MACRO): Likewise. > (MACRO_MAP_NUM_MACRO_TOKENS): Likewise. > (MACRO_MAP_LOCATIONS): Likewise. > (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise. > (LINEMAPS_MAP_INFO): Likewise. > (LINEMAPS_MAPS): Likewise. > (LINEMAPS_ALLOCATED): Likewise. > (LINEMAPS_USED): Likewise. > (LINEMAPS_CACHE): Likewise. > (LINEMAPS_ORDINARY_CACHE): Likewise. > (LINEMAPS_MACRO_CACHE): Likewise. > (LINEMAPS_MAP_AT): Convert from a macro to an inline function. > (LINEMAPS_LAST_MAP): Likewise. > (LINEMAPS_LAST_ALLOCATED_MAP): Likewise. > (LINEMAPS_ORDINARY_MAPS): Likewise. > (LINEMAPS_ORDINARY_MAP_AT): Likewise. > (LINEMAPS_ORDINARY_ALLOCATED): Likewise. > (LINEMAPS_ORDINARY_USED): Likewise. > (LINEMAPS_LAST_ORDINARY_MAP): Likewise. > (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise. > (LINEMAPS_MACRO_MAPS): Likewise. > (LINEMAPS_MACRO_MAP_AT): Likewise. > (LINEMAPS_MACRO_ALLOCATED): Likewise. > (LINEMAPS_MACRO_USED): Likewise. > (LINEMAPS_MACRO_LOWEST_LOCATION): Likewise. > (LINEMAPS_LAST_MACRO_MAP): Likewise. > (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise. > (IS_ADHOC_LOC): Likewise. > (COMBINE_LOCATION_DATA): Likewise. > (SOURCE_LINE): Likewise. > (SOURCE_COLUMN): Likewise. > (LAST_SOURCE_LINE_LOCATION): Likewise. > (LAST_SOURCE_LINE): Likewise. > (LAST_SOURCE_COLUMN): Likewise. > (LAST_SOURCE_LINE_LOCATION) > (INCLUDED_FROM): Likewise. > (MAIN_FILE_P): Likewise. > (LINEMAP_FILE): Likewise. > (LINEMAP_LINE): Likewise. > (LINEMAP_SYSP): Likewise. > (linemap_location_before_p): Likewise. > * line-map.c (linemap_check_files_exited): Make local "map" const. > (linemap_add): Use SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS. > (linemap_line_start): Likewise. OK. Jeff