@@ -1057,9 +1057,22 @@ def write_wrappers(expf, wrapf, methods):
1057
1057
print ("SKIP (%d undocumented methods): %s" % (len (undoc ), ", " .join (undoc )))
1058
1058
1059
1059
1060
- def gen_wrapper (include_dirs ):
1060
+ ADD_VERSIONS = {
1061
+ "union_pw_aff" : 15 ,
1062
+ "multi_union_pw_aff" : 15 ,
1063
+ "basic_map_list" : 15 ,
1064
+ "map_list" : 15 ,
1065
+ "union_set_list" : 15 ,
1066
+ }
1067
+
1068
+
1069
+ def gen_wrapper (include_dirs , include_barvinok = False , isl_version = None ):
1061
1070
fdata = FunctionData (["." ] + include_dirs )
1062
- fdata .read_header ("isl_declaration_macros_expanded.h" )
1071
+ if isl_version is None :
1072
+ fdata .read_header ("isl_declaration_macros_expanded.h" )
1073
+ else :
1074
+ fdata .read_header ("isl_declaration_macros_expanded_v%d.h"
1075
+ % isl_version )
1063
1076
fdata .read_header ("isl/id.h" )
1064
1077
fdata .read_header ("isl/space.h" )
1065
1078
fdata .read_header ("isl/set.h" )
@@ -1083,10 +1096,20 @@ def gen_wrapper(include_dirs):
1083
1096
fdata .read_header ("isl/ast.h" )
1084
1097
fdata .read_header ("isl/ast_build.h" )
1085
1098
1099
+ if include_barvinok :
1100
+ fdata .read_header ("barvinok/isl.h" )
1101
+
1086
1102
for part , classes in PART_TO_CLASSES .items ():
1087
1103
expf = open ("src/wrapper/gen-expose-%s.inc" % part , "wt" )
1088
1104
wrapf = open ("src/wrapper/gen-wrap-%s.inc" % part , "wt" )
1089
1105
1106
+ classes = [
1107
+ cls
1108
+ for cls in classes
1109
+ if isl_version is None
1110
+ or ADD_VERSIONS .get (cls ) is None
1111
+ or ADD_VERSIONS .get (cls ) <= isl_version ]
1112
+
1090
1113
write_wrappers (expf , wrapf , [
1091
1114
meth
1092
1115
for cls in classes
0 commit comments