[PATCH] D20286: [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function.

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 09:39:50 PDT 2016


vsk added a comment.

Thanks, just two comments.


================
Comment at: lib/ProfileData/Coverage/CoverageMappingReader.cpp:408
@@ -401,1 +407,3 @@
+      if (!InsertResult.second &&
+          (!FuncHash || Records[InsertResult.first->second].FunctionHash)) {
         CFR++;
----------------
I'd find this a bit easier to read if InsertResult.first->second had its own variable.

================
Comment at: lib/ProfileData/Coverage/CoverageMappingReader.cpp:408
@@ -401,1 +407,3 @@
+      if (!InsertResult.second &&
+          (!FuncHash || Records[InsertResult.first->second].FunctionHash)) {
         CFR++;
----------------
vsk wrote:
> I'd find this a bit easier to read if InsertResult.first->second had its own variable.
If `!InsertResult.second && FuncHash`, wdyt of creating an error if `Records[InsertResult.first->second].FunctionHash != FuncHash`?


http://reviews.llvm.org/D20286





More information about the llvm-commits mailing list