Allows llvm-cov to read GCOV data generated by CLANG 3.6
Justin Bogner
mail at justinbogner.com
Mon Mar 16 17:23:39 PDT 2015
Vanderson Martins do Rosario <vandersonmr2 at gmail.com> writes:
> FIX bug 22436. llvm-cov now allows to continuing reading gcda file if it has
> arcs from exit block, and just showing a message warning about that in the
> same way as GNU gcov.
Sorry it took so long, but I've committed this for you in r232443. I've
also fixed our default gcov emission to be what llvm-cov understands
again in r232438, which should fix pr22436 in a bit of a better way.
Thanks for working on this!
> Vanderson M. Rosario
>
>
> diff --git a/lib/IR/GCOV.cpp b/lib/IR/GCOV.cpp
> index 245c500..c43cb99 100644
> --- a/lib/IR/GCOV.cpp
> +++ b/lib/IR/GCOV.cpp
> @@ -263,10 +263,13 @@ bool GCOVFunction::readGCDA(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
> // required to combine the edge counts that are contained in the GCDA file.
> for (uint32_t BlockNo = 0; Count > 0; ++BlockNo) {
> // The last block is always reserved for exit block
> - if (BlockNo >= Blocks.size()-1) {
> + if (BlockNo > Blocks.size()-1) {
> errs() << "Unexpected number of edges (in " << Name << ").\n";
> return false;
> }
> + if (BlockNo == Blocks.size()-1) {
> + errs() << "(" << Name << ") has arcs from exit block.\n";
> + }
> GCOVBlock &Block = *Blocks[BlockNo];
> for (size_t EdgeNo = 0, End = Block.getNumDstEdges(); EdgeNo < End;
> ++EdgeNo) {
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list