Also compare stdout and stderr lines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81018 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/CmpDriver b/utils/CmpDriver
index ad75809..16b1081 100755
--- a/utils/CmpDriver
+++ b/utils/CmpDriver
@@ -97,7 +97,7 @@
                 ln.startswith('Configured with: ') or
                 ln.startswith('Thread model: ') or
                 ln.startswith('gcc version') or
-                ln.startswith('ccc version')):
+                ln.startswith('clang version')):
                 pass
             elif ln.strip().startswith('"'):
                 self.commands.append(list(splitArgs(ln)))
@@ -131,15 +131,41 @@
     # Compare stdout.
     if infoA.stdout != infoB.stdout:
         print '-- STDOUT DIFFERS -'
-        print 'A: ',infoA.stdout
-        print 'B: ',infoB.stdout
+        print 'A OUTPUT: ',infoA.stdout
+        print 'B OUTPUT: ',infoB.stdout
+        print
+
+        diff = ZipperDiff(infoA.stdout.split('\n'),
+                          infoB.stdout.split('\n'))
+        for i,(aElt,bElt) in enumerate(diff.getDiffs()):
+            if aElt is None:
+                print 'A missing: %s' % bElt
+            elif bElt is None:
+                print 'B missing: %s' % aElt
+            else:
+                print 'mismatch: A: %s' % aElt
+                print '          B: %s' % bElt
+
         differ = True
 
     # Compare stderr.
     if infoA.stderr != infoB.stderr:
         print '-- STDERR DIFFERS -'
-        print 'A: ',infoA.stderr
-        print 'B: ',infoB.stderr
+        print 'A STDERR: ',infoA.stderr
+        print 'B STDERR: ',infoB.stderr
+        print
+
+        diff = ZipperDiff(infoA.stderr.split('\n'),
+                          infoB.stderr.split('\n'))
+        for i,(aElt,bElt) in enumerate(diff.getDiffs()):
+            if aElt is None:
+                print 'A missing: %s' % bElt
+            elif bElt is None:
+                print 'B missing: %s' % aElt
+            else:
+                print 'mismatch: A: %s' % aElt
+                print '          B: %s' % bElt
+
         differ = True
 
     # Compare commands.