diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-12-10 15:27:51 -0800 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-12-23 15:18:50 -0800 |
commit | 3ee43adfb20d5dc56b7043b314bd22f457c55483 (patch) | |
tree | 53f588c5df51e1ed87cbb3ae42a7ef55b758701a /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 245218bb355599771ba43a0fe1449d1670f2666c (diff) | |
download | llvm-3ee43adfb20d5dc56b7043b314bd22f457c55483.zip llvm-3ee43adfb20d5dc56b7043b314bd22f457c55483.tar.gz llvm-3ee43adfb20d5dc56b7043b314bd22f457c55483.tar.bz2 |
Basic: Add native support for stdin to SourceManager and FileManager
Add support for stdin to SourceManager and FileManager. Adds
FileManager::getSTDIN, which adds a FileEntryRef for `<stdin>` and reads
the MemoryBuffer, which is stored as `FileEntry::Content`.
Eventually the other buffers in `ContentCache` will sink to here as well
-- we probably usually want to load/save a MemoryBuffer eagerly -- but
it's happening early for stdin to get rid of
CompilerInstance::InitializeSourceManager's final call to
`SourceManager::overrideFileContents`.
clang/test/CXX/modules-ts/dcl.dcl/dcl.module/dcl.module.export/p1.cpp
relies on building a module from stdin; supporting that requires setting
ContentCache::BufferOverridden.
Differential Revision: https://reviews.llvm.org/D93148
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
0 files changed, 0 insertions, 0 deletions