From 656525453ed4aea2a273f0d7503e4610741b6171 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 21 Apr 2015 13:36:50 +0200 Subject: Proper treatment of extended asm. --- cparser/Cleanup.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cparser/Cleanup.ml') diff --git a/cparser/Cleanup.ml b/cparser/Cleanup.ml index 09eaff9b..254f6fed 100644 --- a/cparser/Cleanup.ml +++ b/cparser/Cleanup.ml @@ -78,6 +78,8 @@ let add_decl (sto, id, ty, init) = add_typ ty; match init with None -> () | Some i -> add_init i +let add_asm_operand (lbl, cstr, e) = add_exp e + let rec add_stmt s = match s.sdesc with | Sskip -> () @@ -98,7 +100,9 @@ let rec add_stmt s = | Sreturn(Some e) -> add_exp e | Sblock sl -> List.iter add_stmt sl | Sdecl d -> add_decl d - | Sasm _ -> () + | Sasm(attr, template, outputs, inputs, flags) -> + List.iter add_asm_operand outputs; + List.iter add_asm_operand inputs let add_fundef f = add_typ f.fd_ret; -- cgit