[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
Fri Aug 17 02:34:27 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());
+
----------------
calixte wrote:
> 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.
In fact the entry block is not changed by splitBasicBlock.
Repository:
rL LLVM
https://reviews.llvm.org/D49853
More information about the llvm-commits
mailing list