Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto detect when a gcno has been produced with llvm #137

Merged
merged 3 commits into from
Jun 27, 2018

Conversation

calixteman
Copy link
Collaborator

Fix #25.

@calixteman calixteman requested a review from marco-c June 27, 2018 11:04
@marco-c marco-c merged commit 9b26c29 into mozilla:master Jun 27, 2018
@@ -17,12 +17,23 @@ pub enum ArchiveType {
Dir(PathBuf),
}

pub enum FilePath<'a> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably get rid of this, if we make is_gcno_llvm accept a generic reader (e.g. like parse_lcov in src/parser.rs).
It's a minor thing though, so I've merged this and I'll file a follow-up 'good-first-bug' issue for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_gcno_llvm already take a std::io::Read, here I need to make the diff between Zip and Dir finally, since we've a Read when we're in a zip and we've a file when we're in a dir.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file could be read at https://github.com/mozilla/grcov/pull/137/files#diff-55015d4ff29cae5f493ea6ded47589b7R136, and the buffer passed to handle_file, so that in both cases (FilePath::File and FilePath::Path) you'd always pass a buffer to handle_file

@calixteman calixteman deleted the issue_25 branch July 4, 2018 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants