[PATCH] D49853: [gcov] Display the hit counter for the line of a function definition

calixte via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 04:55:44 PDT 2018


calixte added inline comments.


================
Comment at: lib/Transforms/Instrumentation/GCOVProfiling.cpp:588
+      // to have a counter for the function definition
+      Func.getBlock(&F.getEntryBlock()).getFile(SP->getFilename()).addLine(SP->getLine());
+
----------------
marco-c wrote:
> Nit: you might try to use EntryBlock, if it still usable after the split. Not so important though.
> 
> The formatting seems to be off.
It seems that EntryBlock::splitBasicBlock (http://llvm.org/doxygen/BasicBlock_8cpp_source.html#l00401) is creating a new BasicBlock so we must get it from F.


Repository:
  rL LLVM

https://reviews.llvm.org/D49853





More information about the llvm-commits mailing list