From 99b823c2eba391877a0fcd6bc5f03f0d9f0077cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Duncan=20P=2E=20N=2E=20Exon=C2=A0Smith?= Date: Wed, 4 Nov 2020 18:31:40 -0500 Subject: [PATCH] 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 --- clang/lib/Frontend/ASTUnit.cpp | 3 --- 1 file changed, 3 deletions(-) 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()); -- 2.7.4