anemet added a comment.

Please clean this up as well (don't have commented-out lines) so that it's 
ready to go with the LLVM patch.



================
Comment at: lib/CodeGen/CodeGenAction.cpp:302-305
     static void DiagnosticHandler(const llvm::DiagnosticInfo &DI,
                                   void *Context) {
       ((BackendConsumer *)Context)->DiagnosticHandlerImpl(DI);
     }
----------------
Remove this.


================
Comment at: lib/CodeGen/CodeGenAction.cpp:761
+public:
+  ClangDiagnosticHandler(const CodeGenOptions &CGOpts, void *DiagContext)
+      : DiagnosticHandler(DiagContext), CodeGenOpts(CGOpts) {}
----------------
Again don't overload DiagContext as such.  Have a dedicated field for the 
BackendConsumer.


================
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
----------------
Any reason you moved where we set this up?


https://reviews.llvm.org/D37196



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to