diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-10-16 14:39:28 -0400 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-10-26 15:38:13 -0400 |
commit | 22e6b1863e74136908842d71b4f942313d89b273 (patch) | |
tree | cb13bf2306bae0716e6046e313b41c1979ba412c /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 139785dc98ae94717eebaed083eeaad5d775b495 (diff) | |
download | llvm-22e6b1863e74136908842d71b4f942313d89b273.zip llvm-22e6b1863e74136908842d71b4f942313d89b273.tar.gz llvm-22e6b1863e74136908842d71b4f942313d89b273.tar.bz2 |
SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef
4dc5573acc0d2e7c59d8bac2543eb25cb4b32984 added `FileEntryRef` in order to
help enable sharing of a `FileManager` between `CompilerInstance`s.
It also added a `StringRef` with the filename on `FileInfo`. This
doubled `sizeof(FileInfo)`, bloating `sizeof(SLocEntry)`, of which we
have one for each (loaded and unloaded) file and macro expansion. This
causes a memory regression in modules builds.
Move the filename down into the `ContentCache`, which is a side data
structure for `FileInfo` that does not impact `sizeof(SLocEntry)`. Once
`FileEntryRef` is used for `ContentCache::OrigEntry` this can go away.
Differential Revision: https://reviews.llvm.org/D89580
Radar-Id: rdar://59908826
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions