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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 14:19:46 PST 2019


craig.topper added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenAction.cpp:85
 
+  // setOptRecordFile retruns true if there is a record file. The record file can
+  // be an empty file. If it returns false, then there is an error.
----------------
retruns -> returns


================
Comment at: clang/lib/CodeGen/CodeGenAction.cpp:312
+      // There is a record file and it is not empty.
+      if (isSet && OptRecordFile &&
           CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone)
----------------
You already returned if isSet is false so this check is uneeded.


================
Comment at: clang/lib/CodeGen/CodeGenAction.cpp:1119
+        CI.setASTConsumer(std::move(Consumer));
+        if (!CI.hasASTConsumer())
+          return;
----------------
I don't work in the frontend. Can setASTConsumer fail somehow or would hasASTConsumer always return true.


================
Comment at: clang/lib/CodeGen/CodeGenAction.cpp:1122
+
+        Ctx.setBiteCodeDiagnosticHandler
+        (std::make_unique<ClangDiagnosticHandler>
----------------
This looks strangely formatted. The opening parenthese should be on the previous line. Please run clang-format on this


================
Comment at: llvm/include/llvm/IR/LLVMContext.h:151
 
+  void setBiteCodeDiagnosticHandler(std::unique_ptr<DiagnosticHandler>&&DH,
+				    bool RespectFilters = false);
----------------
Bite->Bit


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

https://reviews.llvm.org/D70691





More information about the llvm-commits mailing list