From: Ian Jackson Date: Tue, 10 Sep 2019 11:25:26 +0000 (+0100) Subject: tools/ocaml: abi-check: Cope with multiple conversions of same type X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1616 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=46d3def38c92b3c1892e2f7da2eaaa85dcffcc6b;p=xen.git tools/ocaml: abi-check: Cope with multiple conversions of same type Signed-off-by: Ian Jackson Acked-by: Andrew Cooper Acked-by: Christian Lindig --- diff --git a/tools/ocaml/libs/xc/abi-check b/tools/ocaml/libs/xc/abi-check index 9450676429..abcd6ce6f1 100755 --- a/tools/ocaml/libs/xc/abi-check +++ b/tools/ocaml/libs/xc/abi-check @@ -27,6 +27,8 @@ our $ei; # followed by anotations of the following form: # /* ! OType OPrefix Mangle */ # /* ! CPrefix CFinal CFinalHow */ +# or, for subsequent invocations for the same OType, just +# /* ! OType */ # # The function definitions use /* ! */ which simply skips that instance. while () { @@ -42,6 +44,9 @@ while () { my @vals = split /\s+/, $1; if ($cline == 1 && !@vals) { $cline = -1; + } elsif ($cline == 1 && @vals == 1) { + my ($otype) = @vals; + die "reference to undefined OType $otype" unless $enums{$otype}; } elsif ($cline == 1 && @vals == 3) { $ei->{$_} = shift @vals foreach qw(OType OPrefix Mangle); } elsif ($cline == 2 && @vals == 3) {