[PATCH] D90888: Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 5 14:28:52 PST 2020


dexonsmith created this revision.
dexonsmith added reviewers: arphaman, JDevlieghere.
Herald added a subscriber: ributzka.
dexonsmith requested review of this revision.

`ASTUnit::Parse` sets up the `FileManager` earlier in the same function,
ensuring `ASTUnit::getFileManager()` matches `Clang->getFileManager()`.
Remove the later call to `setFileManager(getFileManager())` since it
does nothing.


https://reviews.llvm.org/D90888

Files:
  clang/lib/Frontend/ASTUnit.cpp


Index: clang/lib/Frontend/ASTUnit.cpp
===================================================================
--- clang/lib/Frontend/ASTUnit.cpp
+++ clang/lib/Frontend/ASTUnit.cpp
@@ -1186,9 +1186,6 @@
     TopLevelDeclsInPreamble.clear();
   }
 
-  // Create a file manager object to provide access to and cache the filesystem.
-  Clang->setFileManager(&getFileManager());
-
   // Create the source manager.
   Clang->setSourceManager(&getSourceManager());
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90888.303263.patch
Type: text/x-patch
Size: 456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201105/8929b869/attachment.bin>


More information about the cfe-commits mailing list