[PATCH] D69471: [Coverage] Revise format to reduce binary size

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 16:16:19 PDT 2019


dblaikie added inline comments.


================
Comment at: clang/lib/CodeGen/CoverageMappingGen.h:56-65
+
+    FunctionInfo(uint64_t NameHash, uint64_t FuncHash,
+                 const std::string &CoverageMapping, bool IsUsed)
+        : NameHash(NameHash), FuncHash(FuncHash),
+          CoverageMapping(CoverageMapping), IsUsed(IsUsed) {}
+
+    FunctionInfo(const FunctionInfo &) = delete;
----------------
I'd probably skip all these & let it be a plain struct (& use {} init to construct it, as good as the ctor provided I think).


================
Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:74
 
+extern cl::opt<bool> DoNameCompression;
+
----------------
Declaring things from other files without a common header's not ideal. (makes it easy to violate ODR - accidentally change one declaration without the other, etc)


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

https://reviews.llvm.org/D69471





More information about the llvm-commits mailing list