diff options
| author | Vedant Kumar <vsk@apple.com> | 2017-08-02 23:35:24 +0000 | 
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2017-08-02 23:35:24 +0000 | 
| commit | 79554e450e184160084c9abe90fe865735890477 (patch) | |
| tree | 6d697a096d4eb4e1aa629866f72ee8eab5b2ba08 /llvm/tools | |
| parent | 9dcd3e78aebab92899563684065cd3cdaac5395a (diff) | |
| download | bcm5719-llvm-79554e450e184160084c9abe90fe865735890477.tar.gz bcm5719-llvm-79554e450e184160084c9abe90fe865735890477.zip  | |
[llvm-cov] Respect the value of the -show-instantiations option
Make `-show-instantiations=false` actually skip displaying instantiation
sub-views, instead of simply ignoring the option.
llvm-svn: 309903
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index 073bd83e7af..c16d7b44ad6 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -288,6 +288,8 @@ CodeCoverageTool::createSourceFileView(StringRef SourceFile,    auto View = SourceCoverageView::create(SourceFile, SourceBuffer.get(),                                           ViewOpts, std::move(FileCoverage));    attachExpansionSubViews(*View, Expansions, Coverage); +  if (!ViewOpts.ShowFunctionInstantiations) +    return View;    for (const auto *Function : Coverage.getInstantiations(SourceFile)) {      std::unique_ptr<SourceCoverageView> SubView{nullptr}; @@ -696,7 +698,7 @@ int CodeCoverageTool::show(int argc, const char **argv,    cl::opt<bool> ShowInstantiations("show-instantiations", cl::Optional,                                     cl::desc("Show function instantiations"), -                                   cl::cat(ViewCategory)); +                                   cl::init(true), cl::cat(ViewCategory));    cl::opt<std::string> ShowOutputDirectory(        "output-dir", cl::init(""),  | 

