aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/stringt.ads
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2016-04-18 10:48:33 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-18 12:48:33 +0200
commitea1027992d9cc5786beb54439cf310c647e416c5 (patch)
tree2c662c1707d15631c783d9d9a863a520b4ba13c7 /gcc/ada/stringt.ads
parentbd717ec9b7edb898ec138f58a14821e776bb4fa3 (diff)
downloadgcc-ea1027992d9cc5786beb54439cf310c647e416c5.zip
gcc-ea1027992d9cc5786beb54439cf310c647e416c5.tar.gz
gcc-ea1027992d9cc5786beb54439cf310c647e416c5.tar.bz2
sinput.ads, sinput.adb (Build_Location_String): Take a parameter instead of using a global variable.
2016-04-18 Bob Duff <duff@adacore.com> * sinput.ads, sinput.adb (Build_Location_String): Take a parameter instead of using a global variable. The function version no longer destroys the Name_Buffer. * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a parameter, which defaults to the Global_Name_Buffer, so some calls can avoid the global. * exp_ch11.adb, exp_intr.adb: Use new interfaces above to avoid using globals. All but one call to Build_Location_String avoids the global. Only one call to String_From_Name_Buffer avoids it. From-SVN: r235126
Diffstat (limited to 'gcc/ada/stringt.ads')
-rw-r--r--gcc/ada/stringt.ads10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/stringt.ads b/gcc/ada/stringt.ads
index 92b74e2..c48f2b9 100644
--- a/gcc/ada/stringt.ads
+++ b/gcc/ada/stringt.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -29,6 +29,7 @@
-- --
------------------------------------------------------------------------------
+with Namet; use Namet;
with System; use System;
with Types; use Types;
@@ -131,10 +132,9 @@ package Stringt is
function String_Chars_Address return System.Address;
-- Return address of String_Chars table (used by Back_End call to Gigi)
- function String_From_Name_Buffer return String_Id;
- -- Given a name stored in Namet.Name_Buffer (length in Namet.Name_Len),
- -- returns a string of the corresponding value. The value in Name_Buffer
- -- is unchanged, and the cases of letters are unchanged.
+ function String_From_Name_Buffer
+ (Buf : Bounded_String := Global_Name_Buffer) return String_Id;
+ -- Given a name stored in Buf, returns a string of the corresponding value.
function Strings_Address return System.Address;
-- Return address of Strings table (used by Back_End call to Gigi)