diff options
| author | Tristan Gingold <tgingold@free.fr> | 2016-08-02 09:17:08 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2016-08-02 09:17:08 +0200 | 
| commit | 3c83e47c98bc9e58ca2c231a5b24c3639018c9cc (patch) | |
| tree | f2c0133e26ee413d3c778465c552233905a5db56 /src/vhdl/simulate | |
| parent | ee0e651d9b3946910d513e6a670453e25e5f014d (diff) | |
| download | ghdl-3c83e47c98bc9e58ca2c231a5b24c3639018c9cc.tar.gz ghdl-3c83e47c98bc9e58ca2c231a5b24c3639018c9cc.tar.bz2 ghdl-3c83e47c98bc9e58ca2c231a5b24c3639018c9cc.zip  | |
Rewrite most of error and warning messages.
Diffstat (limited to 'src/vhdl/simulate')
| -rw-r--r-- | src/vhdl/simulate/annotations.adb | 3 | ||||
| -rw-r--r-- | src/vhdl/simulate/elaboration.adb | 24 | 
2 files changed, 14 insertions, 13 deletions
diff --git a/src/vhdl/simulate/annotations.adb b/src/vhdl/simulate/annotations.adb index a7c2869a5..4b6270afd 100644 --- a/src/vhdl/simulate/annotations.adb +++ b/src/vhdl/simulate/annotations.adb @@ -1193,7 +1193,8 @@ package body Annotations is        El := Get_Library_Unit (Tree);        if Trace_Annotation then -         Ada.Text_IO.Put_Line ("annotating " & Disp_Node (El)); +         Report_Msg (Msgid_Note, Semantic, No_Location, +                     "annotating %n", (1 => +El));        end if;        case Get_Kind (El) is           when Iir_Kind_Entity_Declaration => diff --git a/src/vhdl/simulate/elaboration.adb b/src/vhdl/simulate/elaboration.adb index f205ea1e4..7ca7063cf 100644 --- a/src/vhdl/simulate/elaboration.adb +++ b/src/vhdl/simulate/elaboration.adb @@ -374,7 +374,8 @@ package body Elaboration is        Package_Instances (Package_Info.Frame_Scope.Pkg_Index) := Instance;        if Trace_Elaboration then -         Ada.Text_IO.Put_Line ("elaborating " & Disp_Node (Decl)); +         Report_Msg (Msgid_Note, Errorout.Elaboration, No_Location, +                     "elaborating %n", (1 => +Decl));        end if;        if Get_Kind (Decl) = Iir_Kind_Package_Instantiation_Declaration then @@ -406,7 +407,8 @@ package body Elaboration is        Instance := Package_Instances (Package_Info.Frame_Scope.Pkg_Index);        if Trace_Elaboration then -         Ada.Text_IO.Put_Line ("elaborating " & Disp_Node (Decl)); +         Report_Msg (Msgid_Note, Errorout.Elaboration, No_Location, +                     "elaborating %n", (1 => +Decl));        end if;        -- Elaborate objects declarations. @@ -1891,7 +1893,7 @@ package body Elaboration is        --  such a design entity.        if not Is_Fully_Bound (Conf) then           Warning_Msg_Elab -           (Warnid_Binding, Stmt, Disp_Node (Stmt) & " not bound"); +           (Warnid_Binding, Stmt, "%n not bound", +Stmt);           return;        end if; @@ -1949,17 +1951,16 @@ package body Elaboration is           if Arch_Name = Null_Identifier then              Arch := Libraries.Get_Latest_Architecture (Entity);              if Arch = Null_Iir then -               Error_Msg_Elab (Stmt, "no architecture analysed for " -                                 & Disp_Node (Entity)); +               Error_Msg_Elab +                 (Stmt, "no architecture analysed for %n", +Entity);              end if;              Arch_Name := Get_Identifier (Arch);           end if;           Arch_Design := Libraries.Load_Secondary_Unit             (Get_Design_Unit (Entity), Arch_Name, Stmt);           if Arch_Design = Null_Iir then -            Error_Msg_Elab (Stmt, -                            "no architecture `" & Name_Table.Image (Arch_Name) -                              & "' for " & Disp_Node (Entity)); +            Error_Msg_Elab +              (Stmt, "no architecture %i for %n", (+Arch_Name, +Entity));           end if;           Arch := Get_Library_Unit (Arch_Design);        end if; @@ -2720,7 +2721,7 @@ package body Elaboration is              Res := Eval_Value_Attribute (Str, Formal_Type, Formal);              if not Eval_Is_In_Bound (Res, Formal_Type) then                 Error_Msg_Elab -                 ("override for " & Disp_Node (Formal) & " is out of bounds"); +                 ("override for %n is out of bounds", +Formal);                 return Null_Iir;              end if;              return Res; @@ -2748,7 +2749,7 @@ package body Elaboration is           when others =>              null;        end case; -      Error_Msg_Elab ("unhandled override for " & Disp_Node (Formal)); +      Error_Msg_Elab ("unhandled override for %n", +Formal);        return Null_Iir;     end Override_Generic; @@ -2815,8 +2816,7 @@ package body Elaboration is                and then not Is_Fully_Constrained_Type (Get_Type (Formal))              then                 Error_Msg_Elab -                 (Formal, -                  "top-level " & Disp_Node (Formal) & " must have a value"); +                 (Formal, "top-level %n must have a value", +Formal);              end if;           end if;           Assoc := Get_Chain (Assoc);  | 
