]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
tools/ocaml: abi-check: Cope with multiple conversions of same type
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 10 Sep 2019 11:25:26 +0000 (12:25 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Tue, 10 Sep 2019 13:17:08 +0000 (14:17 +0100)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
tools/ocaml/libs/xc/abi-check

index 94506764291f8af6486cdc756ce69cc1188ef8a3..abcd6ce6f1dfdbe3374dc0ac0b3ca56c90767287 100755 (executable)
@@ -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 (<C_FILE>) {
@@ -42,6 +44,9 @@ while (<C_FILE>) {
         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) {