Skip to content
Snippets Groups Projects
Commit 5e48bcfa authored by Ted Kremenek's avatar Ted Kremenek
Browse files

Compress argument processing in ccc-analyzer. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127758 91177308-0d34-0410-b5e6-96231b3b80d8
parent 0daaf327
No related branches found
No related tags found
No related merge requests found
...@@ -178,25 +178,20 @@ sub Analyze { ...@@ -178,25 +178,20 @@ sub Analyze {
# Create arguments for doing static analysis. # Create arguments for doing static analysis.
if (defined $ResultFile) { if (defined $ResultFile) {
push @Args,'-o'; push @Args, '-o', $ResultFile;
push @Args, $ResultFile;
} }
elsif (defined $HtmlDir) { elsif (defined $HtmlDir) {
push @Args,'-o'; push @Args, '-o', $HtmlDir;
push @Args, $HtmlDir;
} }
push @Args,"-Xclang"; push @Args, "-Xclang", "-analyzer-display-progress";
push @Args,"-analyzer-display-progress";
foreach my $arg (@$AnalyzeArgs) { foreach my $arg (@$AnalyzeArgs) {
push @Args, "-Xclang"; push @Args, "-Xclang", $arg;
push @Args, $arg;
} }
# Display Ubiviz graph? # Display Ubiviz graph?
if (defined $ENV{'CCC_UBI'}) { if (defined $ENV{'CCC_UBI'}) {
push @Args, "-Xclang"; push @Args, "-Xclang", "-analyzer-viz-egraph-ubigraph";
push @Args,"-analyzer-viz-egraph-ubigraph";
} }
my $AnalysisArgs = GetCCArgs("--analyze", \@Args); my $AnalysisArgs = GetCCArgs("--analyze", \@Args);
...@@ -613,8 +608,7 @@ if ($Action eq 'compile' or $Action eq 'link') { ...@@ -613,8 +608,7 @@ if ($Action eq 'compile' or $Action eq 'link') {
my @AnalyzeArgs; my @AnalyzeArgs;
if ($FileLang ne 'unknown') { if ($FileLang ne 'unknown') {
push @CmdArgs,'-x'; push @CmdArgs, '-x', $FileLang;
push @CmdArgs,$FileLang;
} }
if (defined $StoreModel) { if (defined $StoreModel) {
...@@ -646,8 +640,7 @@ if ($Action eq 'compile' or $Action eq 'link') { ...@@ -646,8 +640,7 @@ if ($Action eq 'compile' or $Action eq 'link') {
if (scalar @Archs) { if (scalar @Archs) {
foreach my $arch (@Archs) { foreach my $arch (@Archs) {
my @NewArgs; my @NewArgs;
push @NewArgs, '-arch'; push @NewArgs, '-arch', $arch;
push @NewArgs, $arch;
push @NewArgs, @CmdArgs; push @NewArgs, @CmdArgs;
Analyze($Clang, \@NewArgs, \@AnalyzeArgs, $FileLang, $Output, Analyze($Clang, \@NewArgs, \@AnalyzeArgs, $FileLang, $Output,
$Verbose, $HtmlDir, $file); $Verbose, $HtmlDir, $file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment