git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274025
91177308-0d34-0410-b5e6-
96231b3b80d8
raw_ostream::Colors Color) const {
return llvm::colored_ostream(OS, Color, Colors);
}
+
+ /// \brief Check if an output directory has been specified.
+ bool hasOutputDirectory() const { return ShowOutputDirectory != ""; }
};
}
SourceCoverageView::createOutputStream(const CoverageViewOptions &Opts,
StringRef Path, StringRef Extension,
bool InToplevel) {
- if (Opts.ShowOutputDirectory == "")
+ if (!Opts.hasOutputDirectory())
return OwnedStream(&outs());
return createFileInDirectory(Opts.ShowOutputDirectory,