+2010-10-22 Jerome Lambourg <lambourg@adacore.com>
+
+ * gnatlink.adb (Process_Binder_File): Remove CLI-specific code, now
+ moved to dotnet-ld.
+ (Gnatlink): Remove CLI-specific code, moved to dotnet-ld
+ * bindgen.adb (Gen_Object_Files_Options): Do not issue -L switches with
+ the .NET compiler, useless and unsupported.
+
+2010-10-22 Robert Dewar <dewar@adacore.com>
+
+ * sem_util.ads (Get_Num_Lit_From_Pos): Fix errors in documentation,
+ this returns a Node_Id for a reference to the entity, not the entity
+ itself!
+
+2010-10-22 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch5.adb (Analyze_Iteration_Scheme): use Insert_Actions when
+ bounds require a temporary.
+
2010-10-22 Robert Dewar <dewar@adacore.com>
* sem_ch4.adb: Minor reformatting.
-- Temporary file used by linker to pass list of object files on
-- certain systems with limitations on size of arguments.
- Lname : String_Access := null;
- -- File used by linker for CLI target, used to concatenate all .il files
- -- when the command line passed to ilasm is too long
-
Debug_Flag_Present : Boolean := False;
Verbose_Mode : Boolean := False;
Very_Verbose_Mode : Boolean := False;
-- to read from a file instead of the command line is only triggered if
-- a conservative threshold is passed.
- if VM_Target = CLI_Target
- and then Link_Bytes > Link_Max
- then
- Lname := new String'("l~" & Base_Name (Ali_File_Name.all) & ".il");
-
- for J in Objs_Begin .. Objs_End loop
- Copy_File (Linker_Objects.Table (J).all, Lname.all,
- Success => Closing_Status,
- Mode => Append);
- end loop;
-
- -- Add the special objects list file option together with the name
- -- of the temporary file to the objects file table.
-
- Linker_Objects.Table (Objs_Begin) :=
- new String'(Value (Object_File_Option_Ptr) & Lname.all);
-
- -- The slots containing these object file names are then removed
- -- from the objects table so they do not appear in the link. They
- -- are removed by moving up the linker options and non-Ada object
- -- files appearing after the Ada object list in the table.
-
- declare
- N : Integer;
-
- begin
- N := Objs_End - Objs_Begin + 1;
-
- for J in Objs_End + 1 .. Linker_Objects.Last loop
- Linker_Objects.Table (J - N + 1) := Linker_Objects.Table (J);
- end loop;
-
- Linker_Objects.Set_Last (Linker_Objects.Last - N + 1);
- end;
-
- elsif Object_List_File_Required
+ if Object_List_File_Required
or else (Object_List_File_Supported
and then Link_Bytes > Link_Max)
then
if Linker_Path = null then
if VM_Target = CLI_Target then
- Linker_Path := System.OS_Lib.Locate_Exec_On_Path ("ilasm");
+ Linker_Path := System.OS_Lib.Locate_Exec_On_Path ("dotnet-ld");
if Linker_Path = null then
Exit_With_Error ("Couldn't locate ilasm");
& Get_Target_Debuggable_Suffix.all);
end if;
- if VM_Target = CLI_Target then
- Linker_Options.Increment_Last;
- Linker_Options.Table (Linker_Options.Last) := new String'("/QUIET");
-
- Linker_Options.Increment_Last;
- Linker_Options.Table (Linker_Options.Last) := new String'("/DEBUG");
-
- Linker_Options.Increment_Last;
- Linker_Options.Table (Linker_Options.Last) :=
- new String'("/OUTPUT=" & Output_File_Name.all);
-
- elsif RTX_RTSS_Kernel_Module_On_Target then
+ if RTX_RTSS_Kernel_Module_On_Target then
Linker_Options.Increment_Last;
Linker_Options.Table (Linker_Options.Last) :=
new String'("/OUT:" & Output_File_Name.all);
IDENT_Op : Boolean := False;
begin
- if VM_Target = CLI_Target then
-
- -- Remove extraneous flags not relevant for CIL. Also remove empty
- -- arguments, since ilasm chokes on them.
-
- for J in reverse Linker_Options.First .. Linker_Options.Last loop
- if Linker_Options.Table (J)'Length = 0
- or else Linker_Options.Table (J) (1 .. 2) = "-L"
- or else Linker_Options.Table (J) (1 .. 2) = "-l"
- or else Linker_Options.Table (J) (1 .. 3) = "-Wl"
- or else Linker_Options.Table (J) (1 .. 3) = "-sh"
- or else Linker_Options.Table (J) (1 .. 2) = "-O"
- or else Linker_Options.Table (J) (1 .. 2) = "-g"
- then
- Linker_Options.Table (J .. Linker_Options.Last - 1) :=
- Linker_Options.Table (J + 1 .. Linker_Options.Last);
- Linker_Options.Decrement_Last;
- Num_Args := Num_Args - 1;
- end if;
- end loop;
-
- elsif AAMP_On_Target then
+ if AAMP_On_Target then
-- Remove extraneous flags not relevant for AAMP
Delete (Tname);
end if;
- if Lname /= null then
- Delete (Lname.all & ASCII.NUL);
- end if;
-
if not Success then
Error_Msg ("error when calling " & Linker_Path.all);
Exit_Program (E_Fatal);
return Expression (Decl);
end if;
- -- Here we make a declaration with a separate assignment statement
+ -- Here we make a declaration with a separate assignment
+ -- statement, and insert before loop header.
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Id,
Object_Definition => New_Occurrence_Of (Typ, Loc));
- Insert_Before (Parent (N), Decl);
- Analyze (Decl);
-
Assign :=
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Id, Loc),
Expression => Relocate_Node (Original_Bound));
- Insert_Before (Parent (N), Assign);
- Analyze (Assign);
+ Insert_Actions (Parent (N), New_List (Decl, Assign));
Rewrite (Original_Bound, New_Occurrence_Of (Id, Loc));
function Get_Enum_Lit_From_Pos
(T : Entity_Id;
Pos : Uint;
- Loc : Source_Ptr) return Entity_Id;
+ Loc : Source_Ptr) return Node_Id;
-- This function obtains the E_Enumeration_Literal entity for the specified
- -- value from the enumeration type or subtype T. The second argument is the
- -- Pos value, which is assumed to be in range. The third argument supplies
- -- a source location for constructed nodes returned by this function.
+ -- value from the enumeration type or subtype T and returns an identifier
+ -- node referencing this value. The second argument is the Pos value, which
+ -- is assumed to be in range. The third argument supplies a source location
+ -- for constructed nodes returned by this function.
procedure Get_Library_Unit_Name_String (Decl_Node : Node_Id);
-- Retrieve the fully expanded name of the library unit declared by