forked from OSchip/llvm-project
[analyzer] This eliminates regression caused by r236423.
Wrap an argument with quotes only if it has spaces. llvm-svn: 236533
This commit is contained in:
parent
5722c0f192
commit
22f6189fb0
|
@ -179,7 +179,11 @@ sub GetCCArgs {
|
|||
die "could not find clang line\n" if (!defined $line);
|
||||
# Strip leading and trailing whitespace characters.
|
||||
$line =~ s/^\s+|\s+$//g;
|
||||
my @items = quotewords('\s+', 1, $line);
|
||||
my @items = quotewords('\s+', 0, $line);
|
||||
# Wrap arguments that have spaces with quotes.
|
||||
foreach (@items) {
|
||||
$_ = qq/"$_"/ if (/\s+/);
|
||||
}
|
||||
my $cmd = shift @items;
|
||||
die "cannot find 'clang' in 'clang' command\n" if (!($cmd =~ /clang/));
|
||||
return \@items;
|
||||
|
|
Loading…
Reference in New Issue