aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-cohama.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-01-10 12:06:44 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-01-10 12:06:44 +0100
commitc9423ca3fa65282b0ca58d33976c150f78e24f23 (patch)
tree294b7686614c59eae2c0a4ac8ed8cd7342de0f82 /gcc/ada/a-cohama.ads
parent72348e26a5b81571cf11491569d5487203425a0c (diff)
downloadgcc-c9423ca3fa65282b0ca58d33976c150f78e24f23.zip
gcc-c9423ca3fa65282b0ca58d33976c150f78e24f23.tar.gz
gcc-c9423ca3fa65282b0ca58d33976c150f78e24f23.tar.bz2
[multiple changes]
2012-01-10 Pascal Obry <obry@adacore.com> * prj-nmsc.adb (Check_Library_Attributes): Kill check for object/source directories for aggregate libraries. 2012-01-10 Matthew Heaney <heaney@adacore.com> * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb, a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb, a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb, a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb, a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare container parameter as aliased in/in out. Code clean ups. 2012-01-10 Bob Duff <duff@adacore.com> * s-os_lib.ads: Improve comment. 2012-01-10 Geert Bosch <bosch@adacore.com> * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing for complex Scalar. From-SVN: r183060
Diffstat (limited to 'gcc/ada/a-cohama.ads')
-rw-r--r--gcc/ada/a-cohama.ads100
1 files changed, 50 insertions, 50 deletions
diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads
index 93c3504..a5b2ff3 100644
--- a/gcc/ada/a-cohama.ads
+++ b/gcc/ada/a-cohama.ads
@@ -148,6 +148,55 @@ package Ada.Containers.Hashed_Maps is
-- Calls Process with the key (with only a constant view) and element (with
-- a variable view) of the node designed by the cursor.
+ type Constant_Reference_Type
+ (Element : not null access constant Element_Type) is private
+ with
+ Implicit_Dereference => Element;
+
+ procedure Write
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : Constant_Reference_Type);
+
+ for Constant_Reference_Type'Write use Write;
+
+ procedure Read
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : out Constant_Reference_Type);
+
+ for Constant_Reference_Type'Read use Read;
+
+ type Reference_Type (Element : not null access Element_Type) is private
+ with
+ Implicit_Dereference => Element;
+
+ procedure Write
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : Reference_Type);
+
+ for Reference_Type'Write use Write;
+
+ procedure Read
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : out Reference_Type);
+
+ for Reference_Type'Read use Read;
+
+ function Constant_Reference
+ (Container : aliased Map;
+ Position : Cursor) return Constant_Reference_Type;
+
+ function Reference
+ (Container : aliased in out Map;
+ Position : Cursor) return Reference_Type;
+
+ function Constant_Reference
+ (Container : aliased Map;
+ Key : Key_Type) return Constant_Reference_Type;
+
+ function Reference
+ (Container : aliased in out Map;
+ Key : Key_Type) return Reference_Type;
+
procedure Assign (Target : in out Map; Source : Map);
function Copy (Source : Map; Capacity : Count_Type := 0) return Map;
@@ -277,55 +326,6 @@ package Ada.Containers.Hashed_Maps is
-- Returns the result of calling Equivalent_Keys with key Left and the node
-- designated by Right.
- type Constant_Reference_Type
- (Element : not null access constant Element_Type) is private
- with
- Implicit_Dereference => Element;
-
- procedure Write
- (Stream : not null access Root_Stream_Type'Class;
- Item : Constant_Reference_Type);
-
- for Constant_Reference_Type'Write use Write;
-
- procedure Read
- (Stream : not null access Root_Stream_Type'Class;
- Item : out Constant_Reference_Type);
-
- for Constant_Reference_Type'Read use Read;
-
- type Reference_Type (Element : not null access Element_Type) is private
- with
- Implicit_Dereference => Element;
-
- procedure Write
- (Stream : not null access Root_Stream_Type'Class;
- Item : Reference_Type);
-
- for Reference_Type'Write use Write;
-
- procedure Read
- (Stream : not null access Root_Stream_Type'Class;
- Item : out Reference_Type);
-
- for Reference_Type'Read use Read;
-
- function Constant_Reference
- (Container : aliased Map;
- Position : Cursor) return Constant_Reference_Type;
-
- function Reference
- (Container : aliased in out Map;
- Position : Cursor) return Reference_Type;
-
- function Constant_Reference
- (Container : aliased Map;
- Key : Key_Type) return Constant_Reference_Type;
-
- function Reference
- (Container : aliased in out Map;
- Key : Key_Type) return Reference_Type;
-
procedure Iterate
(Container : Map;
Process : not null access procedure (Position : Cursor));
@@ -354,7 +354,7 @@ private
type Node_Type is limited record
Key : Key_Type;
- Element : Element_Type;
+ Element : aliased Element_Type;
Next : Node_Access;
end record;