aboutsummaryrefslogtreecommitdiffstats
path: root/src/errorout.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-25 08:14:39 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-25 08:14:39 +0100
commitbc3a8ec174f84cd8f1b13304a9b2d4f3a7bcfdf0 (patch)
treeb25693d533bdf2b3f1946226a7522eb7767a9dc2 /src/errorout.adb
parented54e7f29fcadd7c443a5cf708b0723a82fa27aa (diff)
downloadghdl-bc3a8ec174f84cd8f1b13304a9b2d4f3a7bcfdf0.tar.gz
ghdl-bc3a8ec174f84cd8f1b13304a9b2d4f3a7bcfdf0.tar.bz2
ghdl-bc3a8ec174f84cd8f1b13304a9b2d4f3a7bcfdf0.zip
errorout: add int64 arguments
Diffstat (limited to 'src/errorout.adb')
-rw-r--r--src/errorout.adb23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/errorout.adb b/src/errorout.adb
index 39d4af782..3c3a1947f 100644
--- a/src/errorout.adb
+++ b/src/errorout.adb
@@ -140,6 +140,11 @@ package body Errorout is
return (Kind => Earg_Int32, Val_Int32 => V);
end "+";
+ function "+" (V : Int64) return Earg_Type is
+ begin
+ return (Kind => Earg_Int64, Val_Int64 => V);
+ end "+";
+
function "+" (V : String8_Len_Type) return Earg_Type is
begin
return (Kind => Earg_String8, Val_Str8 => V);
@@ -226,6 +231,18 @@ package body Errorout is
Report_Handler.Message (S (F .. S'Last));
end Output_Int32;
+ procedure Output_Int64 (V : Int64)
+ is
+ S : constant String := Int64'Image (V);
+ F : Positive;
+ begin
+ F := 1;
+ if S (F) = ' ' then
+ F := 2;
+ end if;
+ Report_Handler.Message (S (F .. S'Last));
+ end Output_Int64;
+
procedure Output_String8 (Str : String8_Len_Type) is
begin
Report_Handler.Message ("""");
@@ -365,6 +382,12 @@ package body Errorout is
else
raise Internal_Error;
end if;
+ when Earg_Int64 =>
+ if Format = 'v' then
+ Output_Int64 (Arg.Val_Int64);
+ else
+ raise Internal_Error;
+ end if;
when Earg_Lang_Kind =>
if Lang_Handlers (Arg.Kind) = null then
raise Internal_Error;