]> granicus.if.org Git - clang/commitdiff
Update CmpDriver to report missing commands.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 21 Jan 2009 23:34:23 +0000 (23:34 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 21 Jan 2009 23:34:23 +0000 (23:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62728 91177308-0d34-0410-b5e6-96231b3b80d8

utils/CmpDriver

index cc4caad4f664c224e38a995a4809de81ac626663..54209843df7f95e3f0afea22b1c0e31223c788cb 100755 (executable)
@@ -152,7 +152,16 @@ def main():
         differ = True
 
     # Compare commands.
-    for i,(a,b) in enumerate(zip(infoA.commands, infoB.commands)):
+    for i,(a,b) in enumerate(map(None, infoA.commands, infoB.commands)):
+        if a is None:
+            print 'A MISSING:',' '.join(b)
+            differ = True
+            continue
+        elif b is None:
+            print 'B MISSING:',' '.join(a)
+            differ = True
+            continue
+
         diff = DriverZipperDiff(a,b)
         diffs = list(diff.getDiffs())
         if diffs:
@@ -169,7 +178,7 @@ def main():
                     print 'mismatch: A: %s' % aElt
                     print '          B: %s' % bElt
             differ = True
-
+    
     # Compare result codes.
     if infoA.exitCode != infoB.exitCode:
         print '-- EXIT CODES DIFFER -'