diff options
Diffstat (limited to 'gcc/ada/a-cohama.ads')
-rw-r--r-- | gcc/ada/a-cohama.ads | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index 6550b46a1a1..98b2cb3c5a8 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -148,18 +148,22 @@ package Ada.Containers.Hashed_Maps is function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type; + pragma Inline (Constant_Reference); function Reference (Container : aliased in out Map; Position : Cursor) return Reference_Type; + pragma Inline (Reference); function Constant_Reference (Container : aliased Map; Key : Key_Type) return Constant_Reference_Type; + pragma Inline (Constant_Reference); function Reference (Container : aliased in out Map; Key : Key_Type) return Reference_Type; + pragma Inline (Reference); procedure Assign (Target : in out Map; Source : Map); @@ -369,8 +373,22 @@ private for Cursor'Write use Write; + type Reference_Control_Type is + new Controlled with record + Container : Map_Access; + end record; + + overriding procedure Adjust (Control : in out Reference_Control_Type); + pragma Inline (Adjust); + + overriding procedure Finalize (Control : in out Reference_Control_Type); + pragma Inline (Finalize); + type Constant_Reference_Type - (Element : not null access constant Element_Type) is null record; + (Element : not null access constant Element_Type) is + record + Control : Reference_Control_Type; + end record; procedure Write (Stream : not null access Root_Stream_Type'Class; @@ -385,7 +403,10 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type - (Element : not null access Element_Type) is null record; + (Element : not null access Element_Type) is + record + Control : Reference_Control_Type; + end record; procedure Write (Stream : not null access Root_Stream_Type'Class; |