Author: modocache Date: Tue Jan 9 13:26:47 2018 New Revision: 322118 URL: http://llvm.org/viewvc/llvm-project?rev=322118&view=rev Log: [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 Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=322118&r1=322117&r2=322118&view=diff ============================================================================== --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original) +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Jan 9 13:26:47 2018 @@ -2618,7 +2618,6 @@ static bool isStrictlyPreprocessorAction } static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, - FileManager &FileMgr, DiagnosticsEngine &Diags, frontend::ActionKind Action) { using namespace options; @@ -2840,12 +2839,7 @@ bool CompilerInvocation::CreateFromArgs( !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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits