diff options
Diffstat (limited to 'include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h')
-rw-r--r-- | include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h b/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h index a7ce870400c2..a461a299917c 100644 --- a/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h +++ b/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h @@ -1,9 +1,8 @@ ///===- MachineOptimizationRemarkEmitter.h - Opt Diagnostics -*- C++ -*----===// /// -/// The LLVM Compiler Infrastructure -/// -/// This file is distributed under the University of Illinois Open Source -/// License. See LICENSE.TXT for details. +/// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +/// See https://llvm.org/LICENSE.txt for license information. +/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception /// ///===---------------------------------------------------------------------===// /// \file @@ -159,9 +158,10 @@ public: /// (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(StringRef PassName) const { - return (MF.getFunction().getContext().getDiagnosticsOutputFile() || - MF.getFunction().getContext() - .getDiagHandlerPtr()->isAnyRemarkEnabled(PassName)); + return ( + MF.getFunction().getContext().getRemarkStreamer() || + MF.getFunction().getContext().getDiagHandlerPtr()->isAnyRemarkEnabled( + PassName)); } /// Take a lambda that returns a remark which will be emitted. Second @@ -172,8 +172,11 @@ public: // remarks enabled. We can't currently check whether remarks are requested // for the calling pass since that requires actually building the remark. - if (MF.getFunction().getContext().getDiagnosticsOutputFile() || - MF.getFunction().getContext().getDiagHandlerPtr()->isAnyRemarkEnabled()) { + if (MF.getFunction().getContext().getRemarkStreamer() || + MF.getFunction() + .getContext() + .getDiagHandlerPtr() + ->isAnyRemarkEnabled()) { auto R = RemarkBuilder(); emit((DiagnosticInfoOptimizationBase &)R); } |