MaskRay added inline comments.

================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:1420
+
+    if (CodeGenOpts.CallGraphSection) {
+      MPM.addPass(CGSectionFuncComdatCreatorPass());
----------------
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements


================
Comment at: llvm/lib/Transforms/Utils/CGSectionFuncComdatCreator.cpp:64
+         F.hasAddressTaken(nullptr,
+                           /* IgnoreCallbackUses */ true,
+                           /* IgnoreAssumeLikeCalls */ true,
----------------
clang-format prefers `/*IgnoreCallbackUses=*/true`


================
Comment at: llvm/lib/Transforms/Utils/CGSectionFuncComdatCreator.cpp:91
+  ModuleCGSectionFuncComdatCreator ModuleCG;
+  if (ModuleCG.instrumentModule(M)) {
+    return PreservedAnalyses::none();
----------------
delete braces


================
Comment at: llvm/test/Transforms/Util/create-function-comdats.ll:1
+; Tests that we create function comdats properly and only for those with no
+; comdats.
----------------
This should be within a call-graph-section specific directory.

Use `test/Instrumentation/InstrProfiling/comdat.ll` as a reference


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105911

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

Reply via email to