[llvm] r196530 - llvm-cov: Changed extension from .llcov to .gcov.
Yuchen Wu
yuchenericwu at hotmail.com
Thu Dec 5 12:45:36 PST 2013
Author: ywu
Date: Thu Dec 5 14:45:36 2013
New Revision: 196530
URL: http://llvm.org/viewvc/llvm-project?rev=196530&view=rev
Log:
llvm-cov: Changed extension from .llcov to .gcov.
Added:
llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.orig_gcov
- copied, changed from r196528, llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov
Removed:
llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov
Modified:
llvm/trunk/lib/IR/GCOV.cpp
llvm/trunk/test/tools/llvm-cov/llvm-cov.test
Modified: llvm/trunk/lib/IR/GCOV.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/GCOV.cpp?rev=196530&r1=196529&r2=196530&view=diff
==============================================================================
--- llvm/trunk/lib/IR/GCOV.cpp (original)
+++ llvm/trunk/lib/IR/GCOV.cpp Thu Dec 5 14:45:36 2013
@@ -367,7 +367,7 @@ void FileInfo::print(StringRef GCNOFile,
}
StringRef AllLines = Buff->getBuffer();
- std::string CovFilename = Filename.str() + ".llcov";
+ std::string CovFilename = Filename.str() + ".gcov";
std::string ErrorInfo;
raw_fd_ostream OS(CovFilename.c_str(), ErrorInfo);
if (!ErrorInfo.empty())
Removed: llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov?rev=196529&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov (original)
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov (removed)
@@ -1,82 +0,0 @@
- -: 0:Source:test.cpp
- -: 0:Graph:test.gcno
- -: 0:Data:test.gcda
- -: 0:Runs:2
- -: 0:Programs:1
- -: 1:#include <cstdlib>
- -: 2:
- -: 3:bool on = false;
- -: 4:int len = 42;
- -: 5:double grid[10][10] = {0};
- -: 6:const char * hello = "world";
- -: 7:const char * world = "hello";
- -: 8:
- 4: 9:struct A {
- -: 10: virtual void B();
- -: 11:};
- -: 12:
-8589934592: 13:void A::B() {}
- -: 14:
- #####: 15:void useless() {}
- -: 16:
- -: 17:double more_useless() {
- #####: 18: return 0;
- -: 19:}
- -: 20:
- -: 21:int foo() {
- 2: 22: on = true;
- 2: 23: return 3;
- -: 24:}
- -: 25:
- -: 26:int bar() {
- #####: 27: len--;
- #####: 28: return foo() + 45;
- -: 29:}
- -: 30:
- 8: 31:void assign(int ii, int jj) {
- 8: 32: grid[ii][jj] = (ii+1) * (jj+1);
- 8: 33:}
- -: 34:
- -: 35:void initialize_grid() {
- 12: 36: for (int ii = 0; ii < 2; ii++)
- 24: 37: for (int jj = 0; jj < 2; jj++)
- 12: 38: assign(ii, jj);
- 2: 39:}
- -: 40:
- -: 41:int main() {
- 2: 42: initialize_grid();
- -: 43:
- 2: 44: int a = 2;
- 2: 45: on = rand() % 2;
- 2: 46: if (on) {
- 2: 47: foo();
- 2: 48: ++a;
- 2: 49: } else {
- #####: 50: bar();
- #####: 51: a += rand();
- -: 52: }
- -: 53:
- 44: 54: for (int ii = 0; ii < 10; ++ii) {
- 20: 55: switch (rand() % 5) {
- -: 56: case 0:
- 4: 57: a += rand();
- 4: 58: break;
- -: 59: case 1:
- -: 60: case 2:
- 2: 61: a += rand() / rand();
- 2: 62: break;
- -: 63: case 3:
- 6: 64: a -= rand();
- 6: 65: break;
- -: 66: default:
- 8: 67: a = -1;
- 8: 68: }
- 20: 69: }
- -: 70:
- 2: 71: A thing;
-17179869188: 72: for (uint64_t ii = 0; ii < 4294967296; ++ii)
-8589934592: 73: thing.B();
- -: 74:
- 2: 75: return a + 8 + grid[2][3] + len;
- -: 76: return more_useless();
- -: 77:}
Copied: llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.orig_gcov (from r196528, llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.orig_gcov?p2=llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.orig_gcov&p1=llvm/trunk/test/tools/llvm-cov/Inputs/test.cpp.gcov&r1=196528&r2=196530&rev=196530&view=diff
==============================================================================
(empty)
Modified: llvm/trunk/test/tools/llvm-cov/llvm-cov.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/llvm-cov.test?rev=196530&r1=196529&r2=196530&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-cov/llvm-cov.test (original)
+++ llvm/trunk/test/tools/llvm-cov/llvm-cov.test Thu Dec 5 14:45:36 2013
@@ -6,8 +6,7 @@ RUN: cd %t
RUN: cp %p/Inputs/test* .
RUN: llvm-cov -gcno=test.gcno -gcda=test.gcda
-RUN: diff -aub test.cpp.gcov test.cpp.llcov
-RUN: rm test.cpp.llcov
+RUN: diff -aub test.cpp.orig_gcov test.cpp.gcov
RUN: not llvm-cov -gcno=test_read_fail.gcno -gcda=test.gcda
More information about the llvm-commits
mailing list