summaryrefslogtreecommitdiff
path: root/gcc/ada/snames.adb-tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/snames.adb-tmpl')
-rw-r--r--gcc/ada/snames.adb-tmpl14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ada/snames.adb-tmpl b/gcc/ada/snames.adb-tmpl
index 3a22750b389..05d427743a8 100644
--- a/gcc/ada/snames.adb-tmpl
+++ b/gcc/ada/snames.adb-tmpl
@@ -127,7 +127,15 @@ package body Snames is
function Get_Attribute_Id (N : Name_Id) return Attribute_Id is
begin
- return Attribute_Id'Val (N - First_Attribute_Name);
+ if N = Name_CPU then
+ return Attribute_CPU;
+ elsif N = Name_Dispatching_Domain then
+ return Attribute_Dispatching_Domain;
+ elsif N = Name_Interrupt_Priority then
+ return Attribute_Interrupt_Priority;
+ else
+ return Attribute_Id'Val (N - First_Attribute_Name);
+ end if;
end Get_Attribute_Id;
-----------------------
@@ -399,9 +407,7 @@ package body Snames is
function Is_Internal_Attribute_Name (N : Name_Id) return Boolean is
begin
return
- N = Name_CPU or else
- N = Name_Interrupt_Priority or else
- N = Name_Dispatching_Domain;
+ N in First_Internal_Attribute_Name .. Last_Internal_Attribute_Name;
end Is_Internal_Attribute_Name;
----------------------------