From 1b4943eb1f2a10837f56070bfe604179d0dc10e0 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 28 Mar 2016 10:30:55 -0400 Subject: implement export control --- tools/abifuzz.sh | 2 ++ tools/callgen.ml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/abifuzz.sh b/tools/abifuzz.sh index ef1f26a..57930fb 100755 --- a/tools/abifuzz.sh +++ b/tools/abifuzz.sh @@ -63,6 +63,8 @@ while test -n "$1" do case "$1" in "-callssa") + CALLER=c + CALLEE=ssa ;; "-callc") CALLER=ssa diff --git a/tools/callgen.ml b/tools/callgen.ml index 9a5976c..4679865 100644 --- a/tools/callgen.ml +++ b/tools/callgen.ml @@ -439,7 +439,7 @@ module OutIL = struct typedef oc (argname i) arg; ) args; typedef oc "ret" ret; - fprintf oc "\nfunction w $main() {\n"; + fprintf oc "\nexport function w $main() {\n"; fprintf oc "@start\n"; fprintf oc "\t%%failcode =l alloc4 4\n"; let targs = List.mapi (fun i arg -> @@ -466,7 +466,7 @@ module OutIL = struct typedef oc (argname i) arg; ) args; typedef oc "ret" ret; - fprintf oc "\nfunction %s $f(" (ttype "ret" ret); + fprintf oc "\nexport function %s $f(" (ttype "ret" ret); List.iteri (fun i arg -> let a = argname i in fprintf oc "%s %%%s" (ttype a arg) a; -- cgit 1.4.1