[llvm-branch-commits] [clang] 99b823c - Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC
Duncan P. N. Exon Smith via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 3 16:16:00 PST 2020
Author: Duncan P. N. Exon Smith
Date: 2020-12-03T16:10:59-08:00
New Revision: 99b823c2eba391877a0fcd6bc5f03f0d9f0077cb
URL: https://github.com/llvm/llvm-project/commit/99b823c2eba391877a0fcd6bc5f03f0d9f0077cb
DIFF: https://github.com/llvm/llvm-project/commit/99b823c2eba391877a0fcd6bc5f03f0d9f0077cb.diff
LOG: 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
Added:
Modified:
clang/lib/Frontend/ASTUnit.cpp
Removed:
################################################################################
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index c2aba4102361..c8ac7eaa9ab8 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -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());
More information about the llvm-branch-commits
mailing list