From 562eab97eaa6f777c59818ba06d4597aa581efcb Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Sat, 1 Jul 2017 05:45:26 +0000 Subject: Un-revert "[Driver] Add -fdiagnostics-hotness-threshold" Summary: Un-revert https://reviews.llvm.org/D34868, but with a slight tweak to the documentation to fix an error -- I had used the wrong syntax for a link. llvm-svn: 306948 --- clang/lib/CodeGen/CodeGenAction.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenAction.cpp') diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index ba033d9413c..4f03de55149 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -229,6 +229,9 @@ namespace clang { void *OldDiagnosticContext = Ctx.getDiagnosticContext(); Ctx.setDiagnosticHandler(DiagnosticHandler, this); Ctx.setDiagnosticsHotnessRequested(CodeGenOpts.DiagnosticsWithHotness); + if (CodeGenOpts.DiagnosticsHotnessThreshold != 0) + Ctx.setDiagnosticsHotnessThreshold( + CodeGenOpts.DiagnosticsHotnessThreshold); std::unique_ptr OptRecordFile; if (!CodeGenOpts.OptRecordFile.empty()) { -- cgit v1.2.3