Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 4 Nov 2020 23:31:40 +0000 (18:31 -0500)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 4 Dec 2020 00:10:59 +0000 (16:10 -0800)
`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.

Differential Revision: https://reviews.llvm.org/D90888

clang/lib/Frontend/ASTUnit.cpp

index c2aba41..c8ac7ea 100644 (file)
@@ -1186,9 +1186,6 @@ bool ASTUnit::Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
     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());