summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h')
-rw-r--r--llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h b/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
index 57996dca3dc..4c3b0fb949b 100644
--- a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
+++ b/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
@@ -78,10 +78,9 @@ public:
/// use the extra analysis (1) to filter trivial false positives or (2) to
/// provide more context so that non-trivial false positives can be quickly
/// detected by the user.
- bool allowExtraAnalysis() const {
- // For now, only allow this with -fsave-optimization-record since the -Rpass
- // options are handled in the front-end.
- return F->getContext().getDiagnosticsOutputFile();
+ bool allowExtraAnalysis(StringRef PassName) const {
+ return (F->getContext().getDiagnosticsOutputFile() ||
+ F->getContext().getDiagHandlerPtr()->isAnyRemarkEnabled(PassName));
}
private:
OpenPOWER on IntegriCloud