mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
llvm-cov: Ignore missing .gcda files
When gcov is run without gcda data, it acts as if the counts are all zero and labels the file as - to indicate that there was no data. We should do the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -84,13 +84,18 @@ int main(int argc, char **argv) {
|
||||
|
||||
OwningPtr<MemoryBuffer> GCDA_Buff;
|
||||
if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputGCDA, GCDA_Buff)) {
|
||||
errs() << InputGCDA << ": " << ec.message() << "\n";
|
||||
return 1;
|
||||
}
|
||||
GCOVBuffer GCDA_GB(GCDA_Buff.get());
|
||||
if (!GF.readGCDA(GCDA_GB)) {
|
||||
errs() << "Invalid .gcda File!\n";
|
||||
return 1;
|
||||
if (ec != errc::no_such_file_or_directory) {
|
||||
errs() << InputGCDA << ": " << ec.message() << "\n";
|
||||
return 1;
|
||||
}
|
||||
// Clear the filename to make it clear we didn't read anything.
|
||||
InputGCDA = "-";
|
||||
} else {
|
||||
GCOVBuffer GCDA_GB(GCDA_Buff.get());
|
||||
if (!GF.readGCDA(GCDA_GB)) {
|
||||
errs() << "Invalid .gcda File!\n";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (DumpGCOV)
|
||||
|
Reference in New Issue
Block a user