[PATCH] Allow diagnostic handlers to check for optimization remarks.
Diego Novillo
dnovillo at google.com
Tue Apr 15 12:20:42 PDT 2014
================
Comment at: lib/IR/LLVMContext.cpp:169
@@ +168,3 @@
+ // pattern passed in -pass-remarks.
+ if (pImpl->DiagnosticHandler ||
+ pImpl->optimizationRemarksEnabledFor(PassName))
----------------
Quentin Colombet wrote:
> I am not a huge fan of duplicating this test (i.e., this is the test used in LLVMContext::diagnose).
>
> Could we instead teach optimizationRemarksEnabledFor to always returns true when we set a diagnostic handler?
>
> For instance, we could change the method used to check the optimization remarks within LLVMContext::setDiagnosticHandler.
Oh, sure. I had initially done that, but it didn't seem like the predicate optimizationRemarksEnabledFor() was semantically equivalent if it also checks for a handler.
I'll sink the decision in LLVMContext::setDiagnosticHandler.
http://reviews.llvm.org/D3362
More information about the llvm-commits
mailing list