aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-21 04:46:20 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-21 04:46:20 +0000
commit7e5bd6f061c549dca0c1aeedfdd4009b853264ea (patch)
treecb778ab2b7f80d8277a3df79121ec7fb519b0c63
parent61125c81cc73f7011bab091611dd08b2f38819ae (diff)
Only create a preprocessed file for an ignored attribute if there currently does not exist an 'attribute_ignored_XXX.txt' file for that attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65222 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xutils/ccc-analyzer12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/ccc-analyzer b/utils/ccc-analyzer
index 9e0474b599..c58bcfc013 100755
--- a/utils/ccc-analyzer
+++ b/utils/ccc-analyzer
@@ -198,6 +198,14 @@ sub Analyze {
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 @@ sub Analyze {
$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);
}