Uninitialized variable in sort-Xcode-project-file
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Nov 2017 19:47:34 +0000 (19:47 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Nov 2017 19:47:34 +0000 (19:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179581

Reviewed by Simon Fraser.

Previously all the unified source files were named
UnifiedSource<some-number>.mm. This was changed to
UnifiedSource<some-number>-mm.mm to stop Xcode from creating
hashes for mm and cpp unified source files with the same
number. This broke the expectations in sort-Xcode-project-file.

* Scripts/sort-Xcode-project-file:
(sortChildrenByFileName):
(sortFilesByFileName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224764 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/sort-Xcode-project-file

index b80d9d3..dec06ee 100644 (file)
@@ -1,3 +1,20 @@
+2017-11-13  Keith Miller  <keith_miller@apple.com>
+
+        Uninitialized variable in sort-Xcode-project-file
+        https://bugs.webkit.org/show_bug.cgi?id=179581
+
+        Reviewed by Simon Fraser.
+
+        Previously all the unified source files were named
+        UnifiedSource<some-number>.mm. This was changed to
+        UnifiedSource<some-number>-mm.mm to stop Xcode from creating
+        hashes for mm and cpp unified source files with the same
+        number. This broke the expectations in sort-Xcode-project-file.
+
+        * Scripts/sort-Xcode-project-file:
+        (sortChildrenByFileName):
+        (sortFilesByFileName):
+
 2017-11-13  JF Bastien  <jfbastien@apple.com>
 
         std::expected: fix and test move
index 92ed691..e6234f4 100755 (executable)
@@ -161,8 +161,8 @@ sub sortChildrenByFileName($$)
         return !$aSuffix ? -1 : 1;
     }
     if ($aFileName =~ /^UnifiedSource\d+/ && $bFileName =~ /^UnifiedSource\d+/) {
-        my $aNumber = $1 if $aFileName =~ /^UnifiedSource(\d+)\./;
-        my $bNumber = $1 if $bFileName =~ /^UnifiedSource(\d+)\./;
+        my $aNumber = $1 if $aFileName =~ /^UnifiedSource(\d+)/;
+        my $bNumber = $1 if $bFileName =~ /^UnifiedSource(\d+)/;
         return $aNumber <=> $bNumber;
     }
     return lc($aFileName) cmp lc($bFileName);
@@ -174,8 +174,8 @@ sub sortFilesByFileName($$)
     my $aFileName = $1 if $a =~ /^\s*[A-Z0-9]{24} \/\* (.+) in /;
     my $bFileName = $1 if $b =~ /^\s*[A-Z0-9]{24} \/\* (.+) in /;
     if ($aFileName =~ /^UnifiedSource\d+/ && $bFileName =~ /^UnifiedSource\d+/) {
-        my $aNumber = $1 if $aFileName =~ /^UnifiedSource(\d+)\./;
-        my $bNumber = $1 if $bFileName =~ /^UnifiedSource(\d+)\./;
+        my $aNumber = $1 if $aFileName =~ /^UnifiedSource(\d+)/;
+        my $bNumber = $1 if $bFileName =~ /^UnifiedSource(\d+)/;
         return $aNumber <=> $bNumber;
     }
     return lc($aFileName) cmp lc($bFileName);