diff options
author | Bob Duff <duff@adacore.com> | 2021-04-06 10:27:26 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-06-21 06:45:20 -0400 |
commit | a61fd32dd1f8a4f8a65564f7d2f3b7fbc73167c4 (patch) | |
tree | 5fd48dd1d3a1467263dc1ac3621a799b317a84ea /gcc | |
parent | eba1160fddffe86acd62411b79e0147ea96bd3f2 (diff) | |
download | gcc-a61fd32dd1f8a4f8a65564f7d2f3b7fbc73167c4.zip gcc-a61fd32dd1f8a4f8a65564f7d2f3b7fbc73167c4.tar.gz gcc-a61fd32dd1f8a4f8a65564f7d2f3b7fbc73167c4.tar.bz2 |
[Ada] Optimization of System.Value_N
gcc/ada/
* libgnat/s-valuen.ads (Value_Enumeration,
Valid_Enumeration_Value): Inline.
(Value_Enumeration_Pos): Add Pure_Function.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/libgnat/s-valuen.ads | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/libgnat/s-valuen.ads b/gcc/ada/libgnat/s-valuen.ads index 258d279..7ef0539 100644 --- a/gcc/ada/libgnat/s-valuen.ads +++ b/gcc/ada/libgnat/s-valuen.ads @@ -48,7 +48,7 @@ package System.Value_N is Hash : Hash_Function_Ptr; Num : Natural; Str : String) - return Natural; + return Natural with Inline; -- Used to compute Enum'Value (Str) where Enum is some enumeration type -- other than those defined in package Standard. Names is a string with -- a lower bound of 1 containing the characters of all the enumeration @@ -73,7 +73,7 @@ package System.Value_N is Hash : Hash_Function_Ptr; Num : Natural; Str : String) - return Boolean; + return Boolean with Inline; -- Returns True if Str is a valid Image of some enumeration literal, False -- otherwise. That is, returns False if and only if Value_Enumeration would -- raise Constraint_Error. The parameters have the same meaning as for @@ -87,7 +87,7 @@ package System.Value_N is Hash : Hash_Function_Ptr; Num : Natural; Str : String) - return Integer; + return Integer with Pure_Function; -- Same as Value_Enumeration, except returns Invalid if Value_Enumeration -- would raise Constraint_Error. |