anemet 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 ---------------- vivekvpandya wrote: > 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. > > > At older place I was not able to define ClangDiagnosticHandler class as it > will require definition of BackendComsumer and vice versa. Why? That was inside BackendConsumer. > 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. You can just save the old DiagHandler object instead. https://reviews.llvm.org/D37196 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits