aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/rtsfind.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-07-23 09:54:45 -0400
committerArnaud Charlet <charlet@adacore.com>2020-07-23 09:56:56 -0400
commitad1bea3a4b30482686be9245af78f994722f2fec (patch)
tree6391903a937f03422a0d620f1a9dabedbb241924 /gcc/ada/rtsfind.adb
parent3968b02a4b1dd783b6a8376175061adc195110f4 (diff)
downloadgcc-ad1bea3a4b30482686be9245af78f994722f2fec.zip
gcc-ad1bea3a4b30482686be9245af78f994722f2fec.tar.gz
gcc-ad1bea3a4b30482686be9245af78f994722f2fec.tar.bz2
[Ada] Stub CUDA_Execute and CUDA_Global pragmas
This commit adds CUDA_Execute and CUDA_Global to the list of allowed pragmas. It also implements basic validation of said pragmas. gcc/ada/ * aspects.ads: Declare CUDA_Global as aspect. * einfo.ads: Use Flag118 for the Is_CUDA_Kernel flag. (Set_Is_CUDA_Kernel): New function. (Is_CUDA_Kernel): New function. * einfo.adb (Set_Is_CUDA_Kernel): New function. (Is_CUDA_Kernel): New function. * par-prag.adb (Prag): Ignore Pragma_CUDA_Execute and Pragma_CUDA_global. * rtsfind.ads: Define CUDA.Driver_Types.Stream_T and CUDA.Vector_Types.Dim3 entities * rtsfind.adb: Define CUDA_Descendant subtype. (Get_Unit_Name): Handle CUDA_Descendant packages. * sem_prag.ads: Mark CUDA_Global as aspect-specifying pragma. * sem_prag.adb (Analyze_Pragma): Validate Pragma_CUDA_Execute and Pragma_CUDA_Global. * snames.ads-tmpl: Define Name_CUDA_Execute and Name_CUDA_Global.
Diffstat (limited to 'gcc/ada/rtsfind.adb')
-rw-r--r--gcc/ada/rtsfind.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb
index 7e617b6..5cf3b91 100644
--- a/gcc/ada/rtsfind.adb
+++ b/gcc/ada/rtsfind.adb
@@ -585,6 +585,9 @@ package body Rtsfind is
range Ada_Wide_Wide_Text_IO_Decimal_IO ..
Ada_Wide_Wide_Text_IO_Modular_IO;
+ subtype CUDA_Descendant is RTU_Id
+ range CUDA_Driver_Types .. CUDA_Vector_Types;
+
subtype Interfaces_Descendant is RTU_Id
range Interfaces_Packed_Decimal .. Interfaces_Packed_Decimal;
@@ -665,6 +668,9 @@ package body Rtsfind is
Name_Buffer (22) := '.';
end if;
+ elsif U_Id in CUDA_Descendant then
+ Name_Buffer (5) := '.';
+
elsif U_Id in Interfaces_Descendant then
Name_Buffer (11) := '.';