Commit 4bcd6411 by Johannes Kanig Committed by Arnaud Charlet

frontend.adb (Frontend): Exit after creating Standard package when -gnatd.H is present.

2011-08-29  Johannes Kanig  <kanig@adacore.com>

	* frontend.adb (Frontend): Exit after creating Standard package when
	-gnatd.H is present.
	* gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
	present.

From-SVN: r178180
parent f0f88eb6
2011-08-29 Johannes Kanig <kanig@adacore.com>
* frontend.adb (Frontend): Exit after creating Standard package when
-gnatd.H is present.
* gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
present.
2011-08-29 Robert Dewar <dewar@adacore.com> 2011-08-29 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb, * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
......
...@@ -98,6 +98,12 @@ begin ...@@ -98,6 +98,12 @@ begin
CStand.Create_Standard; CStand.Create_Standard;
-- If the -gnatd.H flag is present, we are only interested in the Standard
-- package, so the frontend has done its job here.
if Debug_Flag_Dot_HH then
return;
end if;
-- Check possible symbol definitions specified by -gnateD switches -- Check possible symbol definitions specified by -gnateD switches
Prepcomp.Process_Command_Line_Symbol_Definitions; Prepcomp.Process_Command_Line_Symbol_Definitions;
......
...@@ -771,8 +771,23 @@ begin ...@@ -771,8 +771,23 @@ begin
Frontend; Frontend;
-- Exit with errors if the main source could not be parsed -- Exit with errors if the main source could not be parsed
-- Also, when -gnatd.H is present, the source file is not set.
if Sinput.Main_Source_File = No_Source_File then if Sinput.Main_Source_File = No_Source_File then
if Debug_Flag_Dot_HH then
-- We lock all the tables to keep the convention that the backend
-- needs to unlock the tables it wants to touch.
Atree.Lock;
Elists.Lock;
Fname.UF.Lock;
Inline.Lock;
Lib.Lock;
Nlists.Lock;
Sem.Lock;
Sinput.Lock;
Namet.Lock;
Stringt.Lock;
Back_End.Call_Back_End (Back_End.Generate_Object);
end if;
Errout.Finalize (Last_Call => True); Errout.Finalize (Last_Call => True);
Errout.Output_Messages; Errout.Output_Messages;
Exit_Program (E_Errors); Exit_Program (E_Errors);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment