[PATCH] Allow diagnostic handlers to check for optimization remarks.

Quentin Colombet qcolombet at apple.com
Fri Apr 11 15:15:02 PDT 2014


  Hi Diego,

  I'd like we take another direction for this patch. See my inline comment.

  Thanks,
  -Quentin


================
Comment at: lib/IR/LLVMContext.cpp:169
@@ +168,3 @@
+  // pattern passed in -pass-remarks.
+  if (pImpl->DiagnosticHandler ||
+      pImpl->optimizationRemarksEnabledFor(PassName))
----------------
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.


http://reviews.llvm.org/D3362






More information about the llvm-commits mailing list