[PATCH] D37196: [Clang] Bug 32352 - Provide a way for OptimizationRemarkEmitter::allowExtraAnalysis to check if (specific) remarks are enabled

Vivek Pandya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 11 11:34:55 PDT 2017


vivekvpandya marked an inline comment as done.
vivekvpandya added inline comments.


================
Comment at: lib/CodeGen/CodeGenAction.cpp:882-883
   BEConsumer = Result.get();
-
+  VMContext->setDiagnosticHandler(llvm::make_unique<ClangDiagnosticHandler>(
+      CI.getCodeGenOpts(), Result.get()));
   // Enable generating macro debug info only when debug info is not disabled and
----------------
anemet wrote:
> Any reason you moved where we set this up?
 

  #  At older place I was not able to define ClangDiagnosticHandler class as it will require definition of BackendComsumer and vice versa.
  # and this seems to be appropriate place to create and tie DiagnosticHandler to LLVMContext

 
But I am not sure about why old diagnostic handler was tied back to  context that is why I wanted someone from clang to look at this.




https://reviews.llvm.org/D37196





More information about the cfe-commits mailing list