From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id F01983830659 for ; Wed, 22 Jun 2022 22:34:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F01983830659 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-596-37yaC_LyOaSL_2OHvpT0Lg-1; Wed, 22 Jun 2022 18:34:49 -0400 X-MC-Unique: 37yaC_LyOaSL_2OHvpT0Lg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 870BE8032E7 for ; Wed, 22 Jun 2022 22:34:49 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.17.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 670B41121314; Wed, 22 Jun 2022 22:34:49 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Subject: [PATCH 05/12] Placeholder libcpp fixups Date: Wed, 22 Jun 2022 18:34:40 -0400 Message-Id: <20220622223447.2462880-6-dmalcolm@redhat.com> In-Reply-To: <20220622223447.2462880-1-dmalcolm@redhat.com> References: <20220622223447.2462880-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2022 22:34:53 -0000 Obviously this isn't quite ready for trunk yet. libcpp/ChangeLog: * include/line-map.h (rich_location::maybe_add_fixit): Make public. * line-map.cc (linemap_add): Hack away assertion about LC_RENAME for now. Signed-off-by: David Malcolm --- libcpp/include/line-map.h | 7 ++++--- libcpp/line-map.cc | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index 80335721e03..c27d8a6fdcd 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -1799,13 +1799,14 @@ class rich_location bool escape_on_output_p () const { return m_escape_on_output; } void set_escape_on_output (bool flag) { m_escape_on_output = flag; } -private: - bool reject_impossible_fixit (location_t where); - void stop_supporting_fixits (); void maybe_add_fixit (location_t start, location_t next_loc, const char *new_content); +private: + bool reject_impossible_fixit (location_t where); + void stop_supporting_fixits (); + public: static const int STATICALLY_ALLOCATED_RANGES = 3; diff --git a/libcpp/line-map.cc b/libcpp/line-map.cc index 62077c3857c..82f27280ea7 100644 --- a/libcpp/line-map.cc +++ b/libcpp/line-map.cc @@ -496,10 +496,11 @@ linemap_add (line_maps *set, enum lc_reason reason, linemap_assert (!LINEMAPS_ORDINARY_USED (set) || (start_location >= MAP_START_LOCATION (LINEMAPS_LAST_ORDINARY_MAP (set)))); - +#if 0 /* When we enter the file for the first time reason cannot be LC_RENAME. */ linemap_assert (!(set->depth == 0 && reason == LC_RENAME)); +#endif /* If we are leaving the main file, return a NULL map. */ if (reason == LC_LEAVE -- 2.26.3