From: Duncan P. N. Exon Smith Date: Wed, 4 Nov 2020 23:31:40 +0000 (-0500) Subject: Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC X-Git-Tag: llvmorg-13-init~4423 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99b823c2eba391877a0fcd6bc5f03f0d9f0077cb;p=platform%2Fupstream%2Fllvm.git Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC `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 --- diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index c2aba41..c8ac7eaa 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -1186,9 +1186,6 @@ bool ASTUnit::Parse(std::shared_ptr 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());