llvm-cov: Support gcov's extermely lenient treatment of -o
authorJustin Bogner <mail@justinbogner.com>
Tue, 18 Feb 2014 09:19:48 +0000 (09:19 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 18 Feb 2014 09:19:48 +0000 (09:19 +0000)
commit257ed1ed698011f1c23f47ca4f1c5f4cf4efbd41
tree4d66767d3ac43acc942dd93e6564e2cdade8f05e
parentce3db3cdb2b0dbd725937814f732f564d42db318
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201555 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-cov/llvm-cov.test
tools/llvm-cov/llvm-cov.cpp