diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-08 03:20:30 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-08 03:20:30 +0000 |
commit | 643df0593c630691fa6877cddeefdd4c3023d444 (patch) | |
tree | 1eb48ad31d05a9ce117bedc17115de96dffa2f0b /gcc/ada/a-ciorse.adb | |
parent | 54f3f029d816c6d1626310649adfda740e203f7b (diff) | |
parent | d5d8f1ccc6d3972dc5cfc0949e85e0b1c9e24ee0 (diff) | |
download | gcc-transactional-memory.tar.gz |
* Merge from mainline rev 181122.transactional-memory
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@181148 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-ciorse.adb')
-rw-r--r-- | gcc/ada/a-ciorse.adb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/ada/a-ciorse.adb b/gcc/ada/a-ciorse.adb index 4257f0974e6..56c33cfe670 100644 --- a/gcc/ada/a-ciorse.adb +++ b/gcc/ada/a-ciorse.adb @@ -38,6 +38,8 @@ pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Set_Operations); with Ada.Unchecked_Deallocation; +with System; use type System.Address; + package body Ada.Containers.Indefinite_Ordered_Sets is type Iterator is new @@ -321,6 +323,20 @@ package body Ada.Containers.Indefinite_Ordered_Sets is Adjust (Container.Tree); end Adjust; + ------------ + -- Assign -- + ------------ + + procedure Assign (Target : in out Set; Source : Set) is + begin + if Target'Address = Source'Address then + return; + end if; + + Target.Clear; + Target.Union (Source); + end Assign; + ------------- -- Ceiling -- ------------- @@ -363,6 +379,17 @@ package body Ada.Containers.Indefinite_Ordered_Sets is return Find (Container, Item) /= No_Element; end Contains; + ---------- + -- Copy -- + ---------- + + function Copy (Source : Set) return Set is + begin + return Target : Set do + Target.Assign (Source); + end return; + end Copy; + --------------- -- Copy_Node -- --------------- |