public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Marc Poulhiès" <poulhies@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Piotr Trojanek <trojanek@adacore.com>
Subject: [COMMITTED] ada: Remove unreferenced utility routine Get_Logical_Line_Number_Img
Date: Tue, 19 Dec 2023 15:30:56 +0100	[thread overview]
Message-ID: <20231219143056.455682-1-poulhies@adacore.com> (raw)

From: Piotr Trojanek <trojanek@adacore.com>

Routine Get_Logical_Line_Number_Img was introduced for splitting of
Pre/Post contracts, but subsequent patch for that feature removed its
only use. It was then used by GNATprove, but that use is now removed
as well.

gcc/ada/

	* sinput.adb, sinput.ads (Get_Logical_Line_Number_Img): Remove.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sinput.adb | 13 -------------
 gcc/ada/sinput.ads |  5 -----
 2 files changed, 18 deletions(-)

diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index 4352cad62c7..dc6b55aede1 100644
--- a/gcc/ada/sinput.adb
+++ b/gcc/ada/sinput.adb
@@ -460,19 +460,6 @@ package body Sinput is
       end if;
    end Get_Logical_Line_Number;
 
-   ---------------------------------
-   -- Get_Logical_Line_Number_Img --
-   ---------------------------------
-
-   function Get_Logical_Line_Number_Img
-     (P : Source_Ptr) return String
-   is
-   begin
-      Name_Len := 0;
-      Add_Nat_To_Name_Buffer (Nat (Get_Logical_Line_Number (P)));
-      return Name_Buffer (1 .. Name_Len);
-   end Get_Logical_Line_Number_Img;
-
    ------------------------------
    -- Get_Physical_Line_Number --
    ------------------------------
diff --git a/gcc/ada/sinput.ads b/gcc/ada/sinput.ads
index 6ce2a22e746..e30487e276f 100644
--- a/gcc/ada/sinput.ads
+++ b/gcc/ada/sinput.ads
@@ -541,11 +541,6 @@ package Sinput is
 
    --  WARNING: There is a matching C declaration of this subprogram in fe.h
 
-   function Get_Logical_Line_Number_Img
-     (P : Source_Ptr) return String;
-   --  Same as above function, but returns the line number as a string of
-   --  decimal digits, with no leading space. Destroys Name_Buffer.
-
    function Get_Physical_Line_Number
      (P : Source_Ptr) return Physical_Line_Number;
    --  The line number of the specified source position is obtained by
-- 
2.43.0


                 reply	other threads:[~2023-12-19 14:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231219143056.455682-1-poulhies@adacore.com \
    --to=poulhies@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=trojanek@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).