This is an archive of the discontinued LLVM Phabricator instance.

[Frontend] avoid copy of PCH data when PrecompiledPreamble stores it in memory
ClosedPublic

Authored by sammccall on Apr 21 2022, 9:00 AM.

Details

Summary

Instead of unconditionally copying the PCHBuffer into an ostream which can be
backed either by a string or a file, just make the PCHBuffer itself the
in-memory storage.

Diff Detail

Event Timeline

sammccall created this revision.Apr 21 2022, 9:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2022, 9:00 AM
sammccall requested review of this revision.Apr 21 2022, 9:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2022, 9:00 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
adamcz accepted this revision.Apr 21 2022, 9:12 AM
This revision is now accepted and ready to land.Apr 21 2022, 9:12 AM
This revision was landed with ongoing or failed builds.Apr 21 2022, 10:53 AM
This revision was automatically updated to reflect the committed changes.

I think this might've broken check-clangd: http://45.33.8.238/linux/74320/step_9.txt

The output isn't very useful though, I'm guessing @yln's recent gtest runner change it's not getting printed.

I think this might've broken check-clangd: http://45.33.8.238/linux/74320/step_9.txt

The output isn't very useful though, I'm guessing @yln's recent gtest runner change it's not getting printed.

Thanks, I've reverted this change and fortunately it reproduces locally (I had only run the clang tests, oops).

I'm really concerned about the test runner change though: it means bots yield essentially no information from crashes (no test name, no stack trace).
So if a crash occurs in a bot config but not locally, there's no clear way to debug it.