mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
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! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@236304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
a0a6defa18
commit
7aa6bebe9c
4 files changed
+7
-1
No files matched your search
+3
-1
@@ -263,10 +263,12 @@ bool GCOVFunction::readGCDA(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
|
|||||||
// required to combine the edge counts that are contained in the GCDA file.
|
// required to combine the edge counts that are contained in the GCDA file.
|
||||||
for (uint32_t BlockNo = 0; Count > 0; ++BlockNo) {
|
for (uint32_t BlockNo = 0; Count > 0; ++BlockNo) {
|
||||||
// The last block is always reserved for exit block
|
// 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";
|
errs() << "Unexpected number of edges (in " << Name << ").\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (BlockNo == Blocks.size() - 1)
|
||||||
|
errs() << "(" << Name << ") has arcs from exit block.\n";
|
||||||
GCOVBlock &Block = *Blocks[BlockNo];
|
GCOVBlock &Block = *Blocks[BlockNo];
|
||||||
for (size_t EdgeNo = 0, End = Block.getNumDstEdges(); EdgeNo < End;
|
for (size_t EdgeNo = 0, End = Block.getNumDstEdges(); EdgeNo < End;
|
||||||
++EdgeNo) {
|
++EdgeNo) {
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -110,4 +110,8 @@ RUN: llvm-cov test.c -gcda=test_file_checksum_fail.gcda
|
|||||||
# Bad function checksum on gcda
|
# Bad function checksum on gcda
|
||||||
RUN: llvm-cov test.c -gcda=test_func_checksum_fail.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
|
XFAIL: powerpc64-, s390x, mips-, mips64-, sparc
|
||||||
Reference in new issue
Block a user