[PATCH] D92529: ASTImporter: Migrate to the FileEntryRef overload of SourceManager::createFileID, NFC
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 2 17:28:46 PST 2020
dexonsmith created this revision.
dexonsmith added reviewers: shafik, arphaman, jansvoboda11.
Herald added subscribers: teemperor, ributzka, martong.
Herald added a reviewer: a.sidorin.
Herald added a project: clang.
dexonsmith requested review of this revision.
Migrate `ASTImporter::Import` over to using the `FileEntryRef` overload
of `SourceManager::createFileID`. No functionality change here.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92529
Files:
clang/lib/AST/ASTImporter.cpp
Index: clang/lib/AST/ASTImporter.cpp
===================================================================
--- clang/lib/AST/ASTImporter.cpp
+++ clang/lib/AST/ASTImporter.cpp
@@ -8719,7 +8719,7 @@
// FIXME: We definitely want to re-use the existing MemoryBuffer, rather
// than mmap the files several times.
auto Entry =
- ToFileManager.getFile(Cache->OrigEntry->getName());
+ ToFileManager.getOptionalFileRef(Cache->OrigEntry->getName());
// FIXME: The filename may be a virtual name that does probably not
// point to a valid file and we get no Entry here. In this case try with
// the memory buffer below.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92529.309114.patch
Type: text/x-patch
Size: 683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201203/b8a1535b/attachment-0001.bin>
More information about the cfe-commits
mailing list