[llvm-branch-commits] [llvm-branch] r236304 - Merging r232443:
Tom Stellard
thomas.stellard at amd.com
Thu Apr 30 19:43:16 PDT 2015
Author: tstellar
Date: Thu Apr 30 21:43:16 2015
New Revision: 236304
URL: http://llvm.org/viewvc/llvm-project?rev=236304&view=rev
Log:
Merging r232443:
------------------------------------------------------------------------
r232443 | mail | 2015-03-16 20:18:51 -0400 (Mon, 16 Mar 2015) | 4 lines
llvm-cov: Warn instead of error if a .gcda has arcs from an exit block
Patch by Vanderson M. Rosario. Thanks!
------------------------------------------------------------------------
Added:
llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcda
llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcno
Modified:
llvm/branches/release_36/lib/IR/GCOV.cpp
llvm/branches/release_36/test/tools/llvm-cov/llvm-cov.test
Modified: llvm/branches/release_36/lib/IR/GCOV.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/IR/GCOV.cpp?rev=236304&r1=236303&r2=236304&view=diff
==============================================================================
--- llvm/branches/release_36/lib/IR/GCOV.cpp (original)
+++ llvm/branches/release_36/lib/IR/GCOV.cpp Thu Apr 30 21:43:16 2015
@@ -263,10 +263,12 @@ bool GCOVFunction::readGCDA(GCOVBuffer &
// 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()) {
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) {
Added: llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcda
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcda?rev=236304&view=auto
==============================================================================
Binary files llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcda (added) and llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcda Thu Apr 30 21:43:16 2015 differ
Added: llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcno
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcno?rev=236304&view=auto
==============================================================================
Binary files llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcno (added) and llvm/branches/release_36/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcno Thu Apr 30 21:43:16 2015 differ
Modified: llvm/branches/release_36/test/tools/llvm-cov/llvm-cov.test
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/tools/llvm-cov/llvm-cov.test?rev=236304&r1=236303&r2=236304&view=diff
==============================================================================
--- llvm/branches/release_36/test/tools/llvm-cov/llvm-cov.test (original)
+++ llvm/branches/release_36/test/tools/llvm-cov/llvm-cov.test Thu Apr 30 21:43:16 2015
@@ -110,4 +110,8 @@ RUN: llvm-cov test.c -gcda=test_file_che
# Bad function checksum on gcda
RUN: llvm-cov test.c -gcda=test_func_checksum_fail.gcda
+# Has arcs from exit blocks
+RUN: llvm-cov test_exit_block_arcs.c 2>&1 | FileCheck %s -check-prefix=EXIT_BLOCK_ARCS
+EXIT_BLOCK_ARCS: (main) has arcs from exit block.
+
XFAIL: powerpc64-, s390x, mips-, mips64-, sparc
More information about the llvm-branch-commits
mailing list