[cfe-dev] clang and code coverage?

Sean McBride sean at rogue-research.com
Mon Aug 30 12:27:25 PDT 2010


On Mon, 16 Aug 2010 10:19:04 -0700, Douglas Gregor said:

>> Is there any way to measure code coverage when using clang?
>> 
>> The gcov docs say: "gcov works only on code compiled with GCC."  Is this
>> true of code built by clang?  Or does clang's "GCC compatibility" design
>> goal extend to this situation?  If not, does/will the llvm project
>> include a replacement for gcov?
>
>Neither Clang nor LLVM have the ability to generate coverage code for
>gcov. I do not know of any replacements in the works.

Thanks Doug for your reply.

Is there a bug for this?  I searched but could not find one.  I filed
<rdar://problem/8107317> after WWDC10 but I'd like to have a bug in the
public llvm.org database too.

As more and more Objective-C features _require_ clang[1], Mac developers
will be forced to choose between these nice new features and being able
to measure code coverage.  I'm not looking forward to that choice. :(

[1] <http://www.mcubedsw.com/blog/index.php/site/comments/new_objective-
c_features/>

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada






More information about the cfe-dev mailing list