This is an archive of the discontinued LLVM Phabricator instance.

[FileCollector] Move interface into FileCollectorBase (NFC)
ClosedPublic

Authored by JDevlieghere on Oct 19 2020, 2:20 PM.

Details

Summary

For the reproducers in LLDB we want to switch to an "immediate mode" FileCollector that writes every file encountered straight to disk so we can generate the actual mapping out-of-process. This patch moves the interface into a separate base class.

Diff Detail

Event Timeline

JDevlieghere created this revision.Oct 19 2020, 2:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2020, 2:20 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
JDevlieghere requested review of this revision.Oct 19 2020, 2:20 PM
dexonsmith requested changes to this revision.Oct 19 2020, 6:45 PM

This mostly looks good, I'm just wondering about tests. I hunted around for a FileCollector unit test and didn't see one, but it seems like it might be a good fit, especially if it gets you coverage things otherwise only used in LLDB. WDYT?

llvm/include/llvm/Support/FileCollector.h
106–110

Seems like these should now have override on them.

This revision now requires changes to proceed.Oct 19 2020, 6:45 PM

This mostly looks good, I'm just wondering about tests. I hunted around for a FileCollector unit test and didn't see one, but it seems like it might be a good fit, especially if it gets you coverage things otherwise only used in LLDB. WDYT?

I think you might have missed FileCollectorTest.cpp. I guess I could add some test for just the base class, but I'm not sure if that would add much value.

JDevlieghere marked an inline comment as done.

Add override

dexonsmith accepted this revision.Oct 19 2020, 9:16 PM

This mostly looks good, I'm just wondering about tests. I hunted around for a FileCollector unit test and didn't see one, but it seems like it might be a good fit, especially if it gets you coverage things otherwise only used in LLDB. WDYT?

I think you might have missed FileCollectorTest.cpp. I guess I could add some test for just the base class, but I'm not sure if that would add much value.

Weird, git grep seems to be returning different results now :). Agreed, it seems like enough.

This LGTM now with the fix for override.

This revision is now accepted and ready to land.Oct 19 2020, 9:16 PM

This mostly looks good, I'm just wondering about tests. I hunted around for a FileCollector unit test and didn't see one, but it seems like it might be a good fit, especially if it gets you coverage things otherwise only used in LLDB. WDYT?

I think you might have missed FileCollectorTest.cpp. I guess I could add some test for just the base class, but I'm not sure if that would add much value.

Weird, git grep seems to be returning different results now :). Agreed, it seems like enough.

This LGTM now with the fix for override.

Been there... Thanks for the review!