summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2017-07-01 04:54:53 +0000
committerBrian Gesiak <modocache@gmail.com>2017-07-01 04:54:53 +0000
commit55e9c111b407088a9222d0cd1cd07c1943c7b82e (patch)
treedc0217d60a4d3deecd9e0df5066e63d2dabb13ef /clang/lib/Frontend/CompilerInvocation.cpp
parentdc6fa5d1f6782505e6dce1420bc357ca4c8f847d (diff)
downloadbcm5719-llvm-55e9c111b407088a9222d0cd1cd07c1943c7b82e.tar.gz
bcm5719-llvm-55e9c111b407088a9222d0cd1cd07c1943c7b82e.zip
Revert "[Driver] Add -fdiagnostics-hotness-threshold"
Summary: The commit caused a documentation breakage. llvm-svn: 306946
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 5851595dab7..b1b10ddf965 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -909,18 +909,12 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.DiagnosticsWithHotness =
Args.hasArg(options::OPT_fdiagnostics_show_hotness);
bool UsingSampleProfile = !Opts.SampleProfileFile.empty();
- bool UsingProfile = UsingSampleProfile ||
- (Opts.getProfileUse() != CodeGenOptions::ProfileNone);
-
- if (Opts.DiagnosticsWithHotness && !UsingProfile)
- Diags.Report(diag::warn_drv_diagnostics_hotness_requires_pgo)
- << "-fdiagnostics-show-hotness";
-
- Opts.DiagnosticsHotnessThreshold = getLastArgUInt64Value(
- Args, options::OPT_fdiagnostics_hotness_threshold_EQ, 0);
- if (Opts.DiagnosticsHotnessThreshold > 0 && !UsingProfile)
- Diags.Report(diag::warn_drv_diagnostics_hotness_requires_pgo)
- << "-fdiagnostics-hotness-threshold=";
+
+ if (Opts.DiagnosticsWithHotness &&
+ Opts.getProfileUse() == CodeGenOptions::ProfileNone &&
+ !UsingSampleProfile) {
+ Diags.Report(diag::warn_drv_fdiagnostics_show_hotness_requires_pgo);
+ }
// If the user requested to use a sample profile for PGO, then the
// backend will need to track source location information so the profile
OpenPOWER on IntegriCloud