From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5846 invoked by alias); 30 Oct 2007 01:36:22 -0000 Received: (qmail 5837 invoked by uid 22791); 30 Oct 2007 01:36:22 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 30 Oct 2007 01:36:19 +0000 Received: from zps19.corp.google.com (zps19.corp.google.com [172.25.146.19]) by smtp-out.google.com with ESMTP id l9U1aDgL029435 for ; Mon, 29 Oct 2007 18:36:13 -0700 Received: from nz-out-0506.google.com (nzii28.prod.google.com [10.36.35.28]) by zps19.corp.google.com with ESMTP id l9U1aCDK014292 for ; Mon, 29 Oct 2007 18:36:13 -0700 Received: by nz-out-0506.google.com with SMTP id i28so1202290nzi for ; Mon, 29 Oct 2007 18:36:12 -0700 (PDT) Received: by 10.115.109.1 with SMTP id l1mr7695920wam.1193708172110; Mon, 29 Oct 2007 18:36:12 -0700 (PDT) Received: by 10.114.156.2 with HTTP; Mon, 29 Oct 2007 18:36:12 -0700 (PDT) Message-ID: Date: Tue, 30 Oct 2007 05:10:00 -0000 From: "Diego Novillo" To: gcc-patches@gcc.gnu.org Subject: [tuples] Add support for mapped locations in gimple_locus_empty_p MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes 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 X-SW-Source: 2007-10/txt/msg01785.txt.bz2 Thanks to Tom for providing the code and checking the other functions dealing with locus_t. Tested on x86_64. Committed. Diego. 2007-10-29 Diego Novillo Tom Tromey * gimple.h (gimple_locus): Update comment. (gimple_set_locus): Likewise. (gimple_locus_empty_p): Add support for mapped locations. Index: gimple.h =================================================================== --- gimple.h (revision 129739) +++ gimple.h (working copy) @@ -543,8 +543,7 @@ gimple_set_block (gimple g, tree block) } -/* Return locus information for statement G. FIXME tuples, fix for - mapped location support. */ +/* Return locus information for statement G. */ static inline location_t gimple_locus (const_gimple g) @@ -553,8 +552,7 @@ gimple_locus (const_gimple g) } -/* Set locus information for statement G. FIXME tuples, fix for - mapped location support. */ +/* Set locus information for statement G. */ static inline void gimple_set_locus (gimple g, location_t locus) @@ -568,7 +566,11 @@ gimple_set_locus (gimple g, location_t l static inline bool gimple_locus_empty_p (const_gimple g) { +#ifdef USE_MAPPED_LOCATION + return gimple_locus (g) == UNKNOWN_LOCATION; +#else return gimple_locus (g).file == NULL && gimple_locus (g).line == 0; +#endif }