[cfe-commits] r65222 - /cfe/trunk/utils/ccc-analyzer

Ted Kremenek kremenek at apple.com
Fri Feb 20 20:46:22 PST 2009


Author: kremenek
Date: Fri Feb 20 22:46:20 2009
New Revision: 65222

URL: http://llvm.org/viewvc/llvm-project?rev=65222&view=rev
Log:
Only create a preprocessed file for an ignored attribute if there currently does not exist an 'attribute_ignored_XXX.txt' file for that attribute.

Modified:
    cfe/trunk/utils/ccc-analyzer

Modified: cfe/trunk/utils/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc-analyzer?rev=65222&r1=65221&r2=65222&view=diff

==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Fri Feb 20 22:46:20 2009
@@ -198,6 +198,14 @@
         next if (defined $attributes_not_handled{$1});
         $attributes_not_handled{$1} = 1;
         
+        # Get the name of the attribute file.
+        my $dir = "$HtmlDir/failures";
+        my $afile = "$dir/attribute_ignored_$1.txt";
+        
+        # Only create another preprocessed file if the attribute file
+        # doesn't exist yet.
+        next if (-e $afile);
+        
         # Add this file to the list of files that contained this attribute.
         # Generate a preprocessed file if we haven't already.
         if (!(defined $ppfile)) {
@@ -206,10 +214,8 @@
                                         $HtmlDir, $AttributeIgnored, $ofile);
         }
 
-        my $dir = "$HtmlDir/failures";
         mkpath $dir;
-        my $afile = "$dir/attribute_ignored_$1.txt";
-        open(AFILE, ">>$afile");
+        open(AFILE, ">$afile");
         print AFILE "$ppfile\n";
         close(AFILE);
       }





More information about the cfe-commits mailing list