[llvm-cov] Do not print out the filename of the object file
When we load coverage data from multiple objects, we don't have a way to attribute a source object to a function record. Printing out the object filename next to the source filename is already not very useful: soon, it'll actually become misleading. Stop printing out the filename now. llvm-svn: 285043
This commit is contained in:
@@ -39,8 +39,7 @@
|
||||
using namespace llvm;
|
||||
using namespace coverage;
|
||||
|
||||
void exportCoverageDataToJson(StringRef ObjectFilename,
|
||||
const coverage::CoverageMapping &CoverageMapping,
|
||||
void exportCoverageDataToJson(const coverage::CoverageMapping &CoverageMapping,
|
||||
raw_ostream &OS);
|
||||
|
||||
namespace {
|
||||
@@ -570,13 +569,6 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
|
||||
CompareFilenamesOnly = FilenameEquivalence;
|
||||
|
||||
ViewOpts.Format = Format;
|
||||
SmallString<128> ObjectFilePath(this->ObjectFilename);
|
||||
if (std::error_code EC = sys::fs::make_absolute(ObjectFilePath)) {
|
||||
error(EC.message(), this->ObjectFilename);
|
||||
return 1;
|
||||
}
|
||||
sys::path::native(ObjectFilePath);
|
||||
ViewOpts.ObjectFilename = ObjectFilePath.c_str();
|
||||
switch (ViewOpts.Format) {
|
||||
case CoverageViewOptions::OutputFormat::Text:
|
||||
ViewOpts.Colors = UseColor == cl::BOU_UNSET
|
||||
@@ -843,7 +835,7 @@ int CodeCoverageTool::export_(int argc, const char **argv,
|
||||
return 1;
|
||||
}
|
||||
|
||||
exportCoverageDataToJson(ObjectFilename, *Coverage.get(), outs());
|
||||
exportCoverageDataToJson(*Coverage.get(), outs());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user