From 926c4208a0a5ce614eda78ce33f649c24e9a2acd Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Thu, 4 Jul 2024 17:17:13 +0200 Subject: [PATCH] Update clightgen after the change on AST.signature --- export/ExportBase.ml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/export/ExportBase.ml b/export/ExportBase.ml index 46012697b2..036c11abd0 100644 --- a/export/ExportBase.ml +++ b/export/ExportBase.ml @@ -158,14 +158,22 @@ let asttype p t = | AST.Tany32 -> "AST.Tany32" | AST.Tany64 -> "AST.Tany64") -let astrettype p = function - | AST.Tret t -> asttype p t - | AST.Tvoid -> fprintf p "AST.Tvoid" - | AST.Tbool -> fprintf p "AST.Tbool" - | AST.Tint8signed -> fprintf p "AST.Tint8signed" - | AST.Tint8unsigned -> fprintf p "AST.Tint8unsigned" - | AST.Tint16signed -> fprintf p "AST.Tint16signed" - | AST.Tint16unsigned -> fprintf p "AST.Tint16unsigned" +let astxtype p t = + fprintf p "%s" + (match t with + | AST.Xbool -> "AST.Xbool" + | AST.Xint8signed -> "AST.Xint8signed" + | AST.Xint8unsigned -> "AST.Xint8unsigned" + | AST.Xint16signed -> "AST.Xint16signed" + | AST.Xint16unsigned -> "AST.Xint16unsigned" + | AST.Xint -> "AST.Xint" + | AST.Xfloat -> "AST.Xfloat" + | AST.Xlong -> "AST.Xlong" + | AST.Xsingle -> "AST.Xsingle" + | AST.Xptr -> "AST.Xptr" + | AST.Xany32 -> "AST.Xany32" + | AST.Xany64 -> "AST.Xany64" + | AST.Xvoid -> "AST.Xvoid") let name_of_chunk = function | Mbool -> "Mbool" @@ -188,8 +196,8 @@ let callconv p cc = let signatur p sg = fprintf p "@[(mksignature@ %a@ %a@ %a)@]" - (print_list asttype) sg.sig_args - astrettype sg.sig_res + (print_list astxtype) sg.sig_args + astxtype sg.sig_res callconv sg.sig_cc let external_function p = function