summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2018-01-09 21:26:47 +0000
committerBrian Gesiak <modocache@gmail.com>2018-01-09 21:26:47 +0000
commitdb60d6e174eff794ae5fb6bc4d3fdbe3add00b62 (patch)
tree4f3a7647ad308399db41f1dd2644b758377135e7 /lib/Frontend/CompilerInvocation.cpp
parent4892b15fb984530d5ba7135f4f57dab1e2adbca2 (diff)
downloadclang-db60d6e174eff794ae5fb6bc4d3fdbe3add00b62.tar.gz
[Frontend] Remove unused FileMgr in pp arg parse
Summary: A FIXME added 8 years ago (2010) in https://reviews.llvm.org/rL118203 mentioned that a FileManager should not need to be used when parsing preprocessor arguments. In fact, its only use was removed 6 years ago (2012), in https://reviews.llvm.org/rL166452. Remove the unused variable and the obsolete FIXME. Test Plan: `check-clang` Reviewers: v.g.vassilev Reviewed By: v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41867 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 7af58b1794..cd4df03dc9 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -2618,7 +2618,6 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {
}
static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
- FileManager &FileMgr,
DiagnosticsEngine &Diags,
frontend::ActionKind Action) {
using namespace options;
@@ -2840,12 +2839,7 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
!LangOpts.Sanitize.has(SanitizerKind::Address) &&
!LangOpts.Sanitize.has(SanitizerKind::Memory);
- // FIXME: ParsePreprocessorArgs uses the FileManager to read the contents of
- // PCH file and find the original header name. Remove the need to do that in
- // ParsePreprocessorArgs and remove the FileManager
- // parameters from the function and the "FileManager.h" #include.
- FileManager FileMgr(Res.getFileSystemOpts());
- ParsePreprocessorArgs(Res.getPreprocessorOpts(), Args, FileMgr, Diags,
+ ParsePreprocessorArgs(Res.getPreprocessorOpts(), Args, Diags,
Res.getFrontendOpts().ProgramAction);
ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), Args,
Res.getFrontendOpts().ProgramAction);