summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-build/libexec/ccc-analyzer
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/scan-build/libexec/ccc-analyzer')
-rwxr-xr-xclang/tools/scan-build/libexec/ccc-analyzer8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/tools/scan-build/libexec/ccc-analyzer b/clang/tools/scan-build/libexec/ccc-analyzer
index 831dd42e9c9..bfda1d326f9 100755
--- a/clang/tools/scan-build/libexec/ccc-analyzer
+++ b/clang/tools/scan-build/libexec/ccc-analyzer
@@ -492,6 +492,9 @@ if (defined $ENV{'CCC_ANALYZER_LOG'}) { $Verbose = 2; }
# Get the HTML output directory.
my $HtmlDir = $ENV{'CCC_ANALYZER_HTML'};
+# Get force-analyze-debug-code option.
+my $ForceAnalyzeDebugCode = $ENV{'CCC_ANALYZER_FORCE_ANALYZE_DEBUG_CODE'};
+
my %DisabledArchs = ('ppc' => 1, 'ppc64' => 1);
my %ArchsSeen;
my $HadArch = 0;
@@ -682,6 +685,11 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
}
}
+# Forcedly enable debugging if requested by user.
+if ($ForceAnalyzeDebugCode) {
+ push @CompileOpts, '-UNDEBUG';
+}
+
# If we are on OSX and have an installation where the
# default SDK is inferred by xcrun use xcrun to infer
# the SDK.
OpenPOWER on IntegriCloud