summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-06-28 16:12:20 +0000
committerVedant Kumar <vsk@apple.com>2016-06-28 16:12:20 +0000
commit184c22415b3454e9ba9189e268ddb24db14bcca6 (patch)
tree394f8a585f989091c5393e8b5638a9cc943a5e12 /tools
parent75f03af5429fb32fbbf90e83fcb795c531c5326c (diff)
[llvm-cov] Minor cleanups (NFC)
- Test the '-o' alias for -output-dir. - Use a helper method in a conditional. - Add a period. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-cov/CodeCoverage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-cov/CodeCoverage.cpp b/tools/llvm-cov/CodeCoverage.cpp
index 270a3408b7c..240acffa779 100644
--- a/tools/llvm-cov/CodeCoverage.cpp
+++ b/tools/llvm-cov/CodeCoverage.cpp
@@ -437,7 +437,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
ViewOpts.Format = Format;
ViewOpts.ShowOutputDirectory = ShowOutputDirectory;
- if (ViewOpts.ShowOutputDirectory != "") {
+ if (ViewOpts.hasOutputDirectory()) {
if (auto E = sys::fs::create_directories(ViewOpts.ShowOutputDirectory)) {
error("Could not create output directory!", E.message());
return 1;
@@ -479,7 +479,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
bool ShowFilenames = SourceFiles.size() != 1;
if (SourceFiles.empty())
- // Get the source files from the function coverage mapping
+ // Get the source files from the function coverage mapping.
for (StringRef Filename : Coverage->getUniqueSourceFiles())
SourceFiles.push_back(Filename);