[PATCH] D70691: Optimization record for bytecode input missing- PR44000

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 09:03:38 PST 2019


craig.topper added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenAction.cpp:1122
+
+        Ctx.setBiteCodeDiagnosticHandler(
+            std::make_unique<ClangDiagnosticHandler>(CI.getCodeGenOpts(),
----------------
This also needs to be bitcode instead of bitecode


================
Comment at: llvm/lib/IR/LLVMContext.cpp:118
+void LLVMContext::
+setBiteCodeDiagnosticHandler(std::unique_ptr<DiagnosticHandler>&&DH, bool RespectFilters)
+{
----------------
zahiraam wrote:
> craig.topper wrote:
> > Why do we need a separate entry point that does the same thing as setDiagnosticHandler?
> setDiagnosticHandler calls builds an object of class ClangDiagnosticHandler that is a base class for diagnostic handling in LLVM. 
> The handleDiagnostics method must be overriden by the subclasses to handle the diagnistic. For bitecode input, the derived class
> doesn't exist. So it needs to be created.
I don’t understand. No objects are created here. The object is created by clang and passed here. This function is identical to the one at line 132.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70691/new/

https://reviews.llvm.org/D70691





More information about the llvm-commits mailing list