Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/ali-util.adb @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
4 -- -- | 4 -- -- |
5 -- A L I . U T I L -- | 5 -- A L I . U T I L -- |
6 -- -- | 6 -- -- |
7 -- B o d y -- | 7 -- B o d y -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- | 9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- |
10 -- -- | 10 -- -- |
11 -- GNAT is free software; you can redistribute it and/or modify it under -- | 11 -- GNAT is free software; you can redistribute it and/or modify it under -- |
12 -- terms of the GNU General Public License as published by the Free Soft- -- | 12 -- terms of the GNU General Public License as published by the Free Soft- -- |
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- | 13 -- ware Foundation; either version 3, or (at your option) any later ver- -- |
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- | 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
213 | 213 |
214 ---------------------- | 214 ---------------------- |
215 -- Read_Withed_ALIs -- | 215 -- Read_Withed_ALIs -- |
216 ---------------------- | 216 ---------------------- |
217 | 217 |
218 procedure Read_Withed_ALIs | 218 procedure Read_Withed_ALIs (Id : ALI_Id) is |
219 (Id : ALI_Id; | |
220 Ignore_Errors : Boolean := False) | |
221 is | |
222 Afile : File_Name_Type; | 219 Afile : File_Name_Type; |
223 Text : Text_Buffer_Ptr; | 220 Text : Text_Buffer_Ptr; |
224 Idread : ALI_Id; | 221 Idread : ALI_Id; |
225 | 222 |
226 begin | 223 begin |
238 if Afile /= No_File | 235 if Afile /= No_File |
239 and then Get_Name_Table_Int (Afile) = 0 | 236 and then Get_Name_Table_Int (Afile) = 0 |
240 then | 237 then |
241 Text := Read_Library_Info (Afile); | 238 Text := Read_Library_Info (Afile); |
242 | 239 |
243 -- Unless Ignore_Errors is true, return with an error if source | 240 -- Unless in GNATprove mode, return with an error if source |
244 -- cannot be found. We used to skip this check when we did not | 241 -- cannot be found. We used to skip this check when we did not |
245 -- compile library generics separately, but we now always do, | 242 -- compile library generics separately, but we now always do, |
246 -- so there is no special case here anymore. | 243 -- so there is no special case here anymore. |
247 | 244 |
248 if Text = null then | 245 if Text = null then |
249 | 246 |
250 if not Ignore_Errors then | 247 if not GNATprove_Mode then |
251 Error_Msg_File_1 := Afile; | 248 Error_Msg_File_1 := Afile; |
252 Error_Msg_File_2 := Withs.Table (W).Sfile; | 249 Error_Msg_File_2 := Withs.Table (W).Sfile; |
253 Error_Msg ("{ not found, { must be compiled"); | 250 Error_Msg ("{ not found, { must be compiled"); |
254 Set_Name_Table_Int (Afile, Int (No_Unit_Id)); | 251 Set_Name_Table_Int (Afile, Int (No_Unit_Id)); |
255 return; | 252 return; |
266 Err => False); | 263 Err => False); |
267 | 264 |
268 Free (Text); | 265 Free (Text); |
269 | 266 |
270 if ALIs.Table (Idread).Compile_Errors | 267 if ALIs.Table (Idread).Compile_Errors |
271 and then not Ignore_Errors | 268 and then not GNATprove_Mode |
272 then | 269 then |
273 Error_Msg_File_1 := Withs.Table (W).Sfile; | 270 Error_Msg_File_1 := Withs.Table (W).Sfile; |
274 Error_Msg ("{ had errors, must be fixed, and recompiled"); | 271 Error_Msg ("{ had errors, must be fixed, and recompiled"); |
275 Set_Name_Table_Int (Afile, Int (No_Unit_Id)); | 272 Set_Name_Table_Int (Afile, Int (No_Unit_Id)); |
276 | 273 |
277 -- In GNATprove mode, object files are never generated, so | 274 -- In GNATprove mode, object files are never generated, so |
278 -- No_Object=True is not considered an error. | 275 -- No_Object=True is not considered an error. |
279 | 276 |
280 elsif ALIs.Table (Idread).No_Object | 277 elsif ALIs.Table (Idread).No_Object |
281 and then not GNATprove_Mode | 278 and then not GNATprove_Mode |
282 and then not Ignore_Errors | |
283 then | 279 then |
284 Error_Msg_File_1 := Withs.Table (W).Sfile; | 280 Error_Msg_File_1 := Withs.Table (W).Sfile; |
285 Error_Msg ("{ must be recompiled"); | 281 Error_Msg ("{ must be recompiled"); |
286 Set_Name_Table_Int (Afile, Int (No_Unit_Id)); | 282 Set_Name_Table_Int (Afile, Int (No_Unit_Id)); |
287 end if; | 283 end if; |