diff options
author | Vedant Kumar <vsk@apple.com> | 2016-06-28 16:12:20 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-06-28 16:12:20 +0000 |
commit | 64d8a029e9657538f7e89b932c0f20248ee0f23c (patch) | |
tree | 823b41930564b1b96adedfd66a66a817b1d69aad /llvm/tools/llvm-cov/CodeCoverage.cpp | |
parent | cef440f7a7dcf17c3d658aa899f989cbfb021d98 (diff) | |
download | bcm5719-llvm-64d8a029e9657538f7e89b932c0f20248ee0f23c.tar.gz bcm5719-llvm-64d8a029e9657538f7e89b932c0f20248ee0f23c.zip |
[llvm-cov] Minor cleanups (NFC)
- Test the '-o' alias for -output-dir.
- Use a helper method in a conditional.
- Add a period.
llvm-svn: 274028
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index 270a3408b7c..240acffa779 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/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); |