1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

286 Commits

Author SHA1 Message Date
Justin Bogner
8365fe2ec3 llvm-cov: Sink some reporting logic into CoverageMapping
This teaches CoverageMapping::getCoveredFunctions to filter to a
particular file and uses that to replace most of the logic found in
llvm-cov report.

llvm-svn: 221962
2014-11-14 01:50:32 +00:00
Lang Hames
e2d639cb82 [Object] Modify OwningBinary's interface to separate inspection from ownership.
The getBinary and getBuffer method now return ordinary pointers of appropriate
const-ness. Ownership is transferred by calling takeBinary(), which returns a
pair of the Binary and a MemoryBuffer.

llvm-svn: 221003
2014-10-31 21:37:49 +00:00
Justin Bogner
e8fc87ab82 llvm-cov: Follow LLVM naming conventions
This renames a few things that are using an unusual naming convention.

llvm-svn: 220929
2014-10-30 20:57:49 +00:00
Justin Bogner
a65f2cf59b llvm-cov: Don't manually parse an option for no reason
We're using cl::opt here, but for some reason we're reading out one
particular option by hand instead. This makes -help and the like
behave rather poorly, so let's not do it this way.

llvm-svn: 220928
2014-10-30 20:51:24 +00:00
Justin Bogner
a5264f6d37 llvm-cov: Very basic top level help
llvm-svn: 220926
2014-10-30 20:29:48 +00:00
Rafael Espindola
d01a093e4e Remove bogus std::error_code returns form SectionRef.
There are two methods in SectionRef that can fail:

* getName: The index into the string table can be invalid.
* getContents: The section might point to invalid contents.

Every other method will always succeed and returning and std::error_code just
complicates the code. For example, a section can have an invalid alignment,
but if we are able to get to the section structure at all and create a
SectionRef, we will always be able to read that invalid alignment.

llvm-svn: 219314
2014-10-08 15:28:58 +00:00
NAKAMURA Takumi
79112cc68c llvm-cov/CoverageReport.cpp: Quick fix for msvcrt, since width specifier "z" is unavailable.
Note, mingw uses its own printf instead of msvcrt.

llvm-svn: 218723
2014-10-01 00:29:26 +00:00
Alex Lorenz
5990711e78 llvm-cov: Use the number of executed functions for the function coverage metric.
This commit fixes llvm-cov's function coverage metric by using the number of executed functions instead of the number of fully covered functions.

Differential Revision: http://reviews.llvm.org/D5196

llvm-svn: 218672
2014-09-30 12:45:13 +00:00
Justin Bogner
38cb80c7b7 llvm-cov: Allow creating CoverageMappings from filenames
llvm-svn: 218185
2014-09-20 17:19:52 +00:00
Justin Bogner
521deeff36 llvm-cov: Disentangle the coverage data logic from the display (NFC)
This splits the logic for actually looking up coverage information
from the logic that displays it. These were tangled rather thoroughly
so this change is a bit large, but it mostly consists of moving things
around. The coverage lookup logic itself now lives in the library,
rather than being spread between the library and the tool.

llvm-svn: 218184
2014-09-20 15:31:56 +00:00
Justin Bogner
dc67e5a852 llvm-cov: Move some reader debug output out of the tool.
This debug output is really for testing CoverageMappingReader, not the
llvm-cov tool. Move it to where it can be more useful.

llvm-svn: 218183
2014-09-20 15:31:51 +00:00
Justin Bogner
eaae74620a llvm-cov: Return unique_ptrs instead of filling objects (NFC)
Having create* functions return the object they create is more
readable than using an in-out parameter.

llvm-svn: 218139
2014-09-19 19:07:17 +00:00
Justin Bogner
1d18b8789a llvm-cov: Fix dropped lines when filters were applied
Uncovered lines in the middle of a covered region weren't being shown
when filtering to a particular function.

llvm-svn: 218109
2014-09-19 08:13:16 +00:00
Justin Bogner
a18d5291d4 llvm-cov: Generalize -filename-equivalence
The filename-equivalence flag allows you to show coverage when your
source files don't have the same full paths as those that generated
the data. This is mostly useful for writing tests in a cross-platform
way.

This wasn't triggering in cases where the filename was derived
directly from the coverage data, which meant certain types of test
case were impossible to write. This patch fixes that, and following
patches involve tests that need this.

llvm-svn: 218108
2014-09-19 08:13:12 +00:00
Justin Bogner
67886cfbbc llvm-cov: Simplify FunctionInstantiationSetCollector (NFC)
- Replace std::unordered_map with DenseMap
- Use std::pair instead of manually combining two unsigneds
- Assert if insert is called with invalid arguments
- Avoid an unnecessary copy of a std::vector

llvm-svn: 218074
2014-09-18 20:31:26 +00:00
Patrik Hagglund
b6dca8f929 Alternative (to r216344) fix of gcc -Wpedantic.
As suggested by David Blaikie, this may be easier to read.

The original warning was:

../tools/llvm-cov/llvm-cov.cpp:53:49: error: ISO C++ forbids zero-size array 'argv' [-Werror=pedantic]
       std::string Invocation(std::string(argv[0]) + " " + argv[1]);

It seems to be the case that GCC's warning gets confused and thinks
'argv' is a declaration here. GCC bugzilla issue #61259.

llvm-svn: 218048
2014-09-18 11:52:57 +00:00
Justin Bogner
804984b091 llvm-cov: Push some more debug output into the View (NFC)
llvm-svn: 217984
2014-09-17 21:48:52 +00:00
Justin Bogner
aa59e21d08 llvm-cov: Rework the API for getting the coverage of a file (NFC)
This encapsulates how we handle the coverage regions of a file or
function. In the old model, the user had to deal with nested regions,
so they needed to maintain their own auxiliary data structures to get
any useful information out of this. The new API provides a sequence of
non-overlapping coverage segments, which makes it possible to render
coverage information in a single pass and avoids a fair amount of
extra work.

llvm-svn: 217975
2014-09-17 18:23:47 +00:00
Justin Bogner
46a2bb923b LineIterator: Provide a variant that keeps blank lines
It isn't always useful to skip blank lines, as evidenced by the
somewhat awkward use of line_iterator in llvm-cov. This adds a knob to
control whether or not to skip blanks.

llvm-svn: 217960
2014-09-17 15:43:01 +00:00
Justin Bogner
6b1db2fff7 llvm-cov: Fix a typo
It doesn't make sense for this default parameter to be false, since
false makes the function a no-op.

llvm-svn: 217945
2014-09-17 08:12:12 +00:00
Justin Bogner
270ad5d7f6 Add move constructors/assignment to make MSVC happy after r217940
llvm-svn: 217941
2014-09-17 06:32:48 +00:00
Justin Bogner
ffaab84f27 llvm-cov: Distinguish expansion/instantiation from SourceCoverageView
SourceCoverageView currently has "Kind" and a list of child views, all
of which must have either an expansion or an instantiation Kind. In
addition to being an error-prone design, this makes it awkward to
differentiate between the two child types and adds a number of
optionally used members to the type.

Split the subview types into their own separate objects, and maintain
lists of each rather than one combined "Children" list.

llvm-svn: 217940
2014-09-17 05:33:20 +00:00
Justin Bogner
b42946011d llvm-cov: Rename a variable and clean up its usage
Offset is a terrible name for an indentation / nesting level, and it
confuses me every time I look at this code.

llvm-svn: 217861
2014-09-16 06:21:57 +00:00
Justin Bogner
bd9ae45726 llvm-cov: Make debug output more consistent
This changes the debug output of the llvm-cov tool to consistently
write to stderr, and moves the highlighting output closer to where
it's relevant.

llvm-svn: 217838
2014-09-15 22:23:29 +00:00
Justin Bogner
50e68a6de5 llvm-cov: Fix an issue with showing regions but not counts
In r217746, though it was supposed to be NFC, I broke llvm-cov's
handling of showing regions without showing counts. This should've
shown up in the existing tests, except they were checking debug output
that was displayed regardless of what was actually output. I've moved
the relevant debug output to a more appropriate place so that the
tests catch this kind of thing.

llvm-svn: 217835
2014-09-15 22:12:28 +00:00
Justin Bogner
293ec338b0 llvm-cov: Clean up some redundancy in the view API (NFC)
This removes the need to pass a starting and ending line when creating
a SourceCoverageView, since these are easy to determine.

llvm-svn: 217746
2014-09-15 03:41:04 +00:00
Justin Bogner
4bb118ab83 llvm-cov: Simplify CounterMappingRegion, pushing logic to its user
A single function in SourceCoverageDataManager was the only user of
some of the comparisons in CounterMappingRegion, and at this point we
know that only one file is relevant. This lets us use slightly simpler
logic directly in the client.

llvm-svn: 217745
2014-09-15 03:41:01 +00:00
Justin Bogner
50f453be5f llvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)
llvm-svn: 217657
2014-09-12 06:52:44 +00:00
Justin Bogner
d27a521c07 Revert "llvm-cov: Remove an overly system specific test"
This fixes a call to sys::fs::equivalent that should've been to
CodeCoverageTool::equivalentFiles, which lets us restore the test of
r217476 that was removed in r217478.

This reverts r217478, but the test works this time.

llvm-svn: 217646
2014-09-11 23:20:48 +00:00
Justin Bogner
40d9fabf30 llvm-cov: Fix a misuse of ArrayRef::slice I introduced in r217430
It appears this code was completely untested, so using ArrayRef wrong
didn't break anything obvious.

llvm-svn: 217476
2014-09-10 06:06:07 +00:00
Justin Bogner
04bf7c7e7c llvm-cov: Use ArrayRef::slice (NFC)
llvm-svn: 217430
2014-09-09 09:15:52 +00:00
Justin Bogner
951fd60695 llvm-cov: Combine two types that were nearly identical (NFC)
llvm-cov had a SourceRange type that was nearly identical to a
CountedRegion except that it shaved off a couple of fields. There
aren't likely to be enough of these for the minor memory savings to be
worth the extra complexity here.

llvm-svn: 217417
2014-09-09 05:32:18 +00:00
Justin Bogner
8f071790c7 llvm-cov: Rename MappingRegion to coverage::CountedRegion (NFC)
This name was too similar to CoverageMappingRegion, and the type
really belongs in the coverage library anyway.

llvm-svn: 217416
2014-09-09 05:32:14 +00:00
Justin Bogner
b977873733 llvm-cov: Use ErrorOr rather than an error_code* (NFC)
llvm-svn: 217404
2014-09-08 21:04:00 +00:00
Justin Bogner
bb93be54d8 llvm-cov: Remove dead code
FunctionCoverageMapping::PrettyName was from a version of the tool
during review, and isn't actually used currently.

llvm-svn: 217398
2014-09-08 19:51:21 +00:00
Justin Bogner
a1e018be46 llvm-cov: Don't pointlessly create a unique_ptr (NFC)
There's no ownership going on here, and no reason to heap allocate
this object.

llvm-svn: 217113
2014-09-04 00:04:54 +00:00
Craig Topper
43cee2f5fc Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.
llvm-svn: 216525
2014-08-27 05:25:25 +00:00
Patrik Hagglund
079768f99c Silence gcc -Wpedantic.
llvm-svn: 216344
2014-08-24 09:12:33 +00:00
Alex Lorenz
f8361e4518 llvm-cov: add code coverage tool that's based on coverage mapping format and clang's pgo.
This commit expands llvm-cov's functionality by adding support for a new code coverage
tool that uses LLVM's coverage mapping format and clang's instrumentation based profiling.
The gcov compatible tool can be invoked by supplying the 'gcov' command as the first argument,
or by modifying the tool's name to end with 'gcov'.

Differential Revision: http://reviews.llvm.org/D4445

llvm-svn: 216300
2014-08-22 22:56:03 +00:00
Alex Lorenz
c3030769bd llvm-cov: move the gcov code into a separate file.
The gcov compatible code is moved to its own file and
llvm-cov is updated to be a wrapper that always calls
the gcov main function.

llvm-svn: 214107
2014-07-28 18:03:51 +00:00
Rafael Espindola
858b9e1423 Update the MemoryBuffer API to use ErrorOr.
llvm-svn: 212405
2014-07-06 17:43:13 +00:00
Justin Bogner
e30ccae2b9 llvm-cov: Support specifying multiple source files
Make llvm-cov compatible with gcov for cases where multiple files are
specified on the command line. That is, loop over each one and report
coverage, and report errors on stderr only rather than via return
code.

llvm-svn: 211959
2014-06-27 20:41:25 +00:00
Rafael Espindola
0df15fc77a Finishing touch for the std::error_code transition.
While std::error_code itself seems to work OK in all platforms, there
are few annoying differences with regards to the std::errc enumeration.

This patch adds a simple llvm enumeration, which will hopefully avoid build
breakages in other platforms and surprises as we get more uses of
std::error_code.

llvm-svn: 210920
2014-06-13 17:20:48 +00:00
Rafael Espindola
5c15b3d369 Remove 'using std::error_code' from tools.
llvm-svn: 210876
2014-06-13 03:07:50 +00:00
Rafael Espindola
e0e308ff6d Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.

llvm-svn: 210835
2014-06-12 21:46:39 +00:00
Rafael Espindola
38dc624425 Remove system_error.h.
This is a minimal change to remove the header. I will remove the occurrences
of "using std::error_code" in a followup patch.

llvm-svn: 210803
2014-06-12 17:38:55 +00:00
Rafael Espindola
cb080681ac Use std::error_code instead of llvm::error_code.
The idea of this patch is to turn llvm/Support/system_error.h into a
transitional header that just brings in the erorr_code api to the llvm
namespace. I will remove it shortly afterwards.

The cases where the general idea needed some tweaking:

* std::errc is a namespace in msvc, so we cannot use "using std::errc". I could
add an #ifdef, but there were not that many uses, so I just added std:: to
them in this patch.

* Template specialization had to be moved to the std namespace in this
patch set already.

* The msvc implementation of default_error_condition doesn't seem to
provide the same transformations as we need. Not too surprising since
the standard doesn't actually say what "equivalent" means. I fixed the
problem by keeping our old mapping and using it at error_code
construction time.

Despite these shortcomings I think this is still a good thing. Some reasons:

* The different implementations of system_error might improve over time.
* It removes 925 lines of code from llvm already.
* It removes 6313 bytes from the text segment of the clang binary when
it is built with gcc and 2816 bytes when building with clang and
libstdc++.

llvm-svn: 210687
2014-06-11 19:05:50 +00:00
Justin Bogner
b8e01630df llvm-cov: Implement --no-output
In gcov, there's a -n/--no-output option, which disables the writing
of any .gcov files, so that it emits only the summary info on stdout.
This implements the same behaviour in llvm-cov.

llvm-svn: 208148
2014-05-07 02:11:18 +00:00
Justin Bogner
6f40bf9196 llvm-cov: Add support for gcov's --long-file-names option
GCOV provides an option to prepend output file names with the source
file name, to disambiguate between covered data that's included from
multiple sources. Add a flag to llvm-cov that does the same.

llvm-svn: 207035
2014-04-23 21:44:55 +00:00
Justin Bogner
ed5cd7f12e llvm-cov: Allow short options to be grouped
llvm-svn: 207034
2014-04-23 21:44:48 +00:00
Ahmed Charles
52ce0c101e Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
Justin Bogner
008ac0494e llvm-cov: Support gcov's extermely lenient treatment of -o
In gcov, the -o flag can accept either a directory or a file name.
When given a directory, the gcda and gcno files are expected to be in
that directory. When given a file, the gcda and gcno files are
expected to be named based on the stem of that file. Non-existent
paths are treated as files.

This implements compatible behaviour.

llvm-svn: 201555
2014-02-18 09:19:48 +00:00
Justin Bogner
8f223c891e llvm-cov: Implement the preserve-paths flag
Until now, when a path in a gcno file included a directory, we would
emit our .gcov file in that directory, whereas gcov always emits the
file in the current directory. In doing so, this implements gcov's
strange name-mangling -p flag, which is needed to avoid clobbering
files when two with the same name exist in different directories.

The path mangling is a bit ugly and only handles unix-like paths, but
it's simple, and it doesn't make any guesses as to how it should
behave outside of what gcov documents. If we decide this should be
cross platform later, we can consider the compatibility implications
then.

llvm-svn: 200754
2014-02-04 10:45:02 +00:00
Justin Bogner
65de807c11 llvm-cov: Implement the object-directory flag
llvm-svn: 200741
2014-02-04 06:41:43 +00:00
Justin Bogner
f5d6ae5d00 llvm-cov: Ignore missing .gcda files
When gcov is run without gcda data, it acts as if the counts are all
zero and labels the file as - to indicate that there was no data. We
should do the same.

llvm-svn: 200740
2014-02-04 06:41:39 +00:00
Justin Bogner
d84fb7d44a llvm-cov: Accept the long forms of gcov options
This is a bit imperfect, as these options don't show up in the help as
is and single dash variants are accepted, which differs from gcov.
Unfortunately, this seems to be as good as it gets with the cl::opt
machinery, so it'll do as an incremental step.

llvm-svn: 200419
2014-01-29 21:31:47 +00:00
Justin Bogner
f2934ce45c llvm-cov: Improve help message text
This Properly capitalizes and clarifies the help output from
llvm-cov. It also puts the llvm-only / non-gcov-compatible options in
their own category.

llvm-svn: 200418
2014-01-29 21:31:45 +00:00
Justin Bogner
25e1dc7514 llvm-cov: Expect a source file as a positional parameter
Currently, llvm-cov isn't command-line compatible with gcov, which
accepts a source file name as its first parameter and infers the gcno
and gcda file names from that. This change keeps our -gcda and -gcno
options available for convenience in overriding this behaviour, but
adds the required parameter and inference behaviour as a compatible
default.

llvm-svn: 200417
2014-01-29 21:31:34 +00:00
Yuchen Wu
a7b83f0a43 llvm-cov: Added -f option for function summaries.
Similar to the file summaries, the function summaries output line,
branching and call statistics. The file summaries have been moved
outside the initial loop so that all of the function summaries can be
outputted before file summaries.

Also updated test cases.

llvm-svn: 197633
2013-12-19 00:29:25 +00:00
Yuchen Wu
fabdd3701d llvm-cov: Added -c option for branch counts.
This will cause llvm-cov to output branch counts instead of branch
probabilities. -b must be enabled.

Also updated tests.

llvm-svn: 197594
2013-12-18 18:40:15 +00:00
Yuchen Wu
20daa1c2fa llvm-cov: Added -u option for unconditional branch info.
Outputs branch information for unconditional branches in addition to
conditional branches. -b option must be enabled.

Also updated tests.

llvm-svn: 197432
2013-12-16 22:14:02 +00:00
Yuchen Wu
698f3e12b7 llvm-cov: Added -b option for branch probabilities.
This option tells llvm-cov to print out branch probabilities when
a basic block contains multiple branches. It also prints out some
function summary info including the number of times the function enters,
the percent of time it returns, and how many blocks were executed.

Also updated tests.

llvm-svn: 197198
2013-12-13 01:15:07 +00:00
Yuchen Wu
9e73c842ad llvm-cov: Added -a option for block data.
Similar to gcov, llvm-cov will now print out the block count at the end
of each block. Multiple blocks can end on the same line.

One computational difference is by using -a, llvm-cov will no longer
simply add the block counts together to form a line count. Instead, it
will take the maximum of the block counts on that line. This has a
similar effect to what gcov does, but generates more correct counts in
certain scenarios.

Also updated tests.

llvm-svn: 196856
2013-12-10 01:02:07 +00:00
Yuchen Wu
d29823e2c3 llvm-cov: Conformed headers.
llvm-svn: 196541
2013-12-05 22:02:29 +00:00
Yuchen Wu
0b08e75d64 llvm-cov: Split GCOVFile's read into GCNO and GCDA.
This splits the file-scope read() function into readGCNO() and
readGCDA(). Also broke file format read into functions that first read
the file type, then check the version.

llvm-svn: 196353
2013-12-04 04:49:23 +00:00
Yuchen Wu
cd7628e981 llvm-cov: Removed output to STDOUT/specified file.
Instead of asking the user to specify a single file to output coverage
info and defaulting to STDOUT, llvm-cov now creates files for each
source file with a naming system of: <source filename> + ".llcov".

This is what gcov does and although it can clutter the working directory
with numerous coverage files, it will be easier to hook the llvm-cov
output to tools which operate on this assumption (such as lcov).

llvm-svn: 196184
2013-12-03 00:57:11 +00:00
Benjamin Kramer
0207e765c7 llvm-cov: Clean up memory leaks.
llvm-svn: 194799
2013-11-15 09:44:17 +00:00
NAKAMURA Takumi
03017d65ec llvm-cov requires IR and Support as libraries. Instrumentation would be overkill.
llvm-svn: 194695
2013-11-14 11:45:16 +00:00
Yuchen Wu
2ca00e3a3d Revert "llvm-cov: Added command-line option to change dir."
This reverts commit d8acf0078cf363252727acff00f85ae8074f95b3.

llvm-svn: 194040
2013-11-05 01:56:29 +00:00
Yuchen Wu
f41fb5a06a llvm-cov: Added command-line option to change dir.
This will allow for much easier testing when the input files are in a
different folder from the test script.

llvm-svn: 194034
2013-11-05 01:20:41 +00:00
Yuchen Wu
c01bdb27f5 Added command-line option to output llvm-cov to file.
Added -o option to llvm-cov. If no output file is specified, it defaults
to STDOUT.

llvm-svn: 193899
2013-11-02 00:09:17 +00:00
Yuchen Wu
bd5d7e04ef Updated llvm-cov's OVERVIEW description
llvm-svn: 193732
2013-10-31 02:01:24 +00:00
Bob Wilson
dfa90927ed Change llvm-cov output formatting to be more similar to gcov.
- Replaced tabs with proper padding
- print() takes two arguments, which are the GCNO and GCDA filenames
- Files are listed at the top of output, appended by line 0
- Stripped strings of trailing \0s
- Removed last two lines of whitespace in output

Patch by Yuchen Wu!

llvm-svn: 193148
2013-10-22 05:09:41 +00:00
Bob Wilson
1a96904c72 Move the printing of llvm-cov information out from collectLineCounts().
collectLineCounts() should only organize the output data. This is done in
anticipation of subsequent changes which will pass in GCNO and GCDA filenames
into the print function where it is printed similar to the gcov output.

Patch by Yuchen Wu!

llvm-svn: 193134
2013-10-22 00:09:03 +00:00
Bill Wendling
f455fc4cc9 Remove accidental commit.
llvm-svn: 167544
2012-11-07 18:39:32 +00:00
Bill Wendling
7c037952d4 Add comment describing what's going on here.
llvm-svn: 167525
2012-11-07 05:19:04 +00:00
Daniel Dunbar
30d6a45140 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Daniel Dunbar
efa02a0c3d LLVMBuild: Add description files for the LLVM tools.
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Daniel Dunbar
81780d9982 build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
new all-targets pseudo-component.

llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Devang Patel
196ef2ac28 Update cmake list.
llvm-svn: 141104
2011-10-04 19:38:16 +00:00
Devang Patel
90c78f84f2 Put GCOVFile and other related interface in a common header so that llvm-cov tool can share it with GCOV writer.
llvm-svn: 141095
2011-10-04 17:24:48 +00:00
Devang Patel
e5a1e5b655 Simplify.
llvm-svn: 140789
2011-09-29 17:06:40 +00:00
Devang Patel
b1bef6ba30 Clarify comments.
llvm-svn: 140787
2011-09-29 16:52:53 +00:00
Devang Patel
0729c18444 Remove unnecessary and unused data member.
llvm-svn: 140786
2011-09-29 16:48:44 +00:00
Devang Patel
204df6030c Cosmetic changes, as per Nick's review.
llvm-svn: 140785
2011-09-29 16:46:47 +00:00
Devang Patel
3605f8423f Introduce llvm-cov.
Add llvm-cov skeleton. It has initial support to read coverage info generated by GCOVProfiling.cpp. 
Today, you can do
prompt> clang a.c -ftest-coverage -fprofile-arcs -o a
prompt> ./a
prompt> llvm-cov -gcno a.gcno -gcda a.gcda 
a.c
 :	#include "a.h"
 :	
 :	int main() {
 :		int i = 0;
 :		if (i) {
1:			int j = 0;
1:			j = 1;
1:		} else {
 :			int k = 1;
 :			k = 2;
 :		}
1:		return 0;
 :	}
 :	
 :	

llvm-svn: 140712
2011-09-28 18:50:00 +00:00