Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 0a5d4e4

Browse files
committed
Partial merge of r293110 into the 4.0 branch
Avoid printing optimization remarks from llc unless they are enabled. Fixes http://llvm.org/PR32184 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@299409 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 08142cb commit 0a5d4e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/llc/llc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ static void DiagnosticHandler(const DiagnosticInfo &DI, void *Context) {
233233
if (DI.getSeverity() == DS_Error)
234234
*HasError = true;
235235

236+
if (auto *Remark = dyn_cast<DiagnosticInfoOptimizationBase>(&DI))
237+
if (!Remark->isEnabled())
238+
return;
239+
236240
DiagnosticPrinterRawOStream DP(errs());
237241
errs() << LLVMContext::getDiagnosticMessagePrefix(DI.getSeverity()) << ": ";
238242
DI.print(DP);

0 commit comments

Comments
 (0)