[llvm-branch-commits] [llvm-branch] r164527 - in /llvm/branches/R600: lib/VMCore/GCOV.cpp test/Other/Inputs/ test/Other/Inputs/llvm-cov.gcda test/Other/Inputs/llvm-cov.gcno test/Other/llvm-cov.test
Tom Stellard
thomas.stellard at amd.com
Mon Sep 24 08:54:11 PDT 2012
Author: tstellar
Date: Mon Sep 24 10:52:31 2012
New Revision: 164527
URL: http://llvm.org/viewvc/llvm-project?rev=164527&view=rev
Log:
Don't do actual work inside an assert statement. Fixes PR11760!
Added:
llvm/branches/R600/test/Other/Inputs/
llvm/branches/R600/test/Other/Inputs/llvm-cov.gcda
llvm/branches/R600/test/Other/Inputs/llvm-cov.gcno
llvm/branches/R600/test/Other/llvm-cov.test
Modified:
llvm/branches/R600/lib/VMCore/GCOV.cpp
Modified: llvm/branches/R600/lib/VMCore/GCOV.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/VMCore/GCOV.cpp?rev=164527&r1=164526&r2=164527&view=diff
==============================================================================
--- llvm/branches/R600/lib/VMCore/GCOV.cpp (original)
+++ llvm/branches/R600/lib/VMCore/GCOV.cpp Mon Sep 24 10:52:31 2012
@@ -48,7 +48,7 @@
GCOVFunction *GFun = NULL;
if (isGCDAFile(Format)) {
// Use existing function while reading .gcda file.
- assert (i < Functions.size() && ".gcda data does not match .gcno data");
+ assert(i < Functions.size() && ".gcda data does not match .gcno data");
GFun = Functions[i];
} else if (isGCNOFile(Format)){
GFun = new GCOVFunction();
@@ -113,7 +113,9 @@
LineNumber = Buff.readInt();
// read blocks.
- assert (Buff.readBlockTag() && "Block Tag not found!");
+ bool BlockTagFound = Buff.readBlockTag();
+ (void)BlockTagFound;
+ assert(BlockTagFound && "Block Tag not found!");
uint32_t BlockCount = Buff.readInt();
for (int i = 0, e = BlockCount; i != e; ++i) {
Buff.readInt(); // Block flags;
@@ -124,7 +126,7 @@
while (Buff.readEdgeTag()) {
uint32_t EdgeCount = (Buff.readInt() - 1) / 2;
uint32_t BlockNo = Buff.readInt();
- assert (BlockNo < BlockCount && "Unexpected Block number!");
+ assert(BlockNo < BlockCount && "Unexpected Block number!");
for (int i = 0, e = EdgeCount; i != e; ++i) {
Blocks[BlockNo]->addEdge(Buff.readInt());
Buff.readInt(); // Edge flag
@@ -136,7 +138,7 @@
uint32_t LineTableLength = Buff.readInt();
uint32_t Size = Buff.getCursor() + LineTableLength*4;
uint32_t BlockNo = Buff.readInt();
- assert (BlockNo < BlockCount && "Unexpected Block number!");
+ assert(BlockNo < BlockCount && "Unexpected Block number!");
GCOVBlock *Block = Blocks[BlockNo];
Buff.readInt(); // flag
while (Buff.getCursor() != (Size - 4)) {
Added: llvm/branches/R600/test/Other/Inputs/llvm-cov.gcda
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/test/Other/Inputs/llvm-cov.gcda?rev=164527&view=auto
==============================================================================
Binary files llvm/branches/R600/test/Other/Inputs/llvm-cov.gcda (added) and llvm/branches/R600/test/Other/Inputs/llvm-cov.gcda Mon Sep 24 10:52:31 2012 differ
Added: llvm/branches/R600/test/Other/Inputs/llvm-cov.gcno
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/test/Other/Inputs/llvm-cov.gcno?rev=164527&view=auto
==============================================================================
Binary files llvm/branches/R600/test/Other/Inputs/llvm-cov.gcno (added) and llvm/branches/R600/test/Other/Inputs/llvm-cov.gcno Mon Sep 24 10:52:31 2012 differ
Added: llvm/branches/R600/test/Other/llvm-cov.test
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/test/Other/llvm-cov.test?rev=164527&view=auto
==============================================================================
--- llvm/branches/R600/test/Other/llvm-cov.test (added)
+++ llvm/branches/R600/test/Other/llvm-cov.test Mon Sep 24 10:52:31 2012
@@ -0,0 +1,3 @@
+PR11760
+RUN: llvm-cov -gcda=%S/Inputs/llvm-cov.gcda -gcno=%S/Inputs/llvm-cov.gcno
+
More information about the llvm-branch-commits
mailing list