OSDN Git Service

* back_end.adb (Call_Back_End): Pass the maximum logical line number
[pf3gnuchains/gcc-fork.git] / gcc / ada / back_end.adb
index 697ad48..b6ad263 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2010, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -114,9 +114,13 @@ package body Back_End is
          return;
       end if;
 
+      --  The back end needs to know the maximum line number that can appear
+      --  in a Sloc, in other words the maximum logical line number.
+
       for J in 1 .. Last_Source_File loop
          File_Info_Array (J).File_Name        := Full_Debug_Name (J);
-         File_Info_Array (J).Num_Source_Lines := Num_Source_Lines (J);
+         File_Info_Array (J).Num_Source_Lines :=
+           Nat (Physical_To_Logical (Last_Source_Line (J), J));
       end loop;
 
       if Generate_SCIL then
@@ -124,7 +128,7 @@ package body Back_End is
 
          if CodePeer_Mode
            or else (Mode /= Generate_Object
-                    and then not Back_Annotate_Rep_Info)
+                     and then not Back_Annotate_Rep_Info)
          then
             return;
          end if;
@@ -325,4 +329,26 @@ package body Back_End is
          Next_Arg := Next_Arg + 1;
       end loop;
    end Scan_Compiler_Arguments;
+
+   -----------------------------
+   -- Register_Back_End_Types --
+   -----------------------------
+
+   procedure Register_Back_End_Types (Call_Back : Register_Type_Proc) is
+      procedure Enumerate_Modes (Call_Back : Register_Type_Proc);
+      pragma Import (C, Enumerate_Modes, "enumerate_modes");
+
+   begin
+      Enumerate_Modes (Call_Back);
+   end Register_Back_End_Types;
+
+   -------------------------------
+   -- Gen_Or_Update_Object_File --
+   -------------------------------
+
+   procedure Gen_Or_Update_Object_File is
+   begin
+      null;
+   end Gen_Or_Update_Object_File;
+
 end Back_End;