[Frontend] Simplify PrecompiledPreamble::PCHStorage. NFC
authorSam McCall <sam.mccall@gmail.com>
Thu, 21 Apr 2022 14:37:01 +0000 (16:37 +0200)
committerSam McCall <sam.mccall@gmail.com>
Thu, 21 Apr 2022 16:10:13 +0000 (18:10 +0200)
commitaf3fb071545918f2de61142fa12d8782e5a37fa5
treecddeb53b1010fc6ac052f3535422e3dc2ff9e426
parent889847922dc6b9247f7f9189cf06e46fa5591049
[Frontend] Simplify PrecompiledPreamble::PCHStorage. NFC

- Remove fiddly union, preambles are heavyweight
- Remove fiddly move constructors in TempPCHFile and PCHStorage, use unique_ptr
- Remove unneccesary accessors on PCHStorage
- Remove trivial InMemoryStorage
- Move implementation details into cpp file

This is a prefactoring, followup change will change the in-memory PCHStorage to
avoid extra string copies while creating it.

Differential Revision: https://reviews.llvm.org/D124177
clang/include/clang/Frontend/PrecompiledPreamble.h
clang/lib/Frontend/PrecompiledPreamble.cpp