[PATCH] D137304: [clang] Store filename per include instead of mutating filename
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 2 18:28:15 PDT 2022
dexonsmith added inline comments.
================
Comment at: clang/include/clang/Basic/SourceManager.h:261-263
+ /// FIXME: Make non-optional using a virtual file as needed, remove \c
+ /// Filename and use \c OrigEntry.getNameAsRequested() instead.
+ OptionalFileEntryRefDegradesToFileEntryPtr OrigEntry;
----------------
benlangmuir wrote:
> dexonsmith wrote:
> > I think this patch should (or does?) implement this FIXME.
> I think it can still be None/nullptr for some buffers. I'll verify that. IIRC the trick to removing Filename is to create virtual file refs in some places that currently don't have one.
Oh, maybe you're right. But if you're able to implement, it might help pay for some of the memory overhead of your patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137304/new/
https://reviews.llvm.org/D137304
More information about the cfe-commits
mailing list