llvm-cov: Handle missing source files as GCOV does
authorJustin Bogner <mail@justinbogner.com>
Wed, 7 May 2014 02:11:23 +0000 (02:11 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 7 May 2014 02:11:23 +0000 (02:11 +0000)
commitc92330c18ce2f7015f0db88e4bfce3d253fa3c57
treeae700f9e5977fb7a1bc760e4f2746b9b2350379b
parent56d05e468cdfd4ad195f264974f1b841bc4ca785
llvm-cov: Handle missing source files as GCOV does

If the source files referenced by a gcno file are missing, gcov
outputs a coverage file where every line is simply /*EOF*/.  This also
occurs for lines in the coverage that are past the end of a file that
is found.

This change mimics gcov.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208149 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/GCOV.h
lib/IR/GCOV.cpp
test/tools/llvm-cov/Inputs/test_missing.cpp.gcov [new file with mode: 0644]
test/tools/llvm-cov/Inputs/test_missing.h.gcov [new file with mode: 0644]
test/tools/llvm-cov/Inputs/test_missing.output [new file with mode: 0644]
test/tools/llvm-cov/llvm-cov.test