From f086e3bef1d98d3fb6c17c8d6b62f3eedd9eb78c Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 18 May 2009 07:39:39 +0000 Subject: [PATCH] Remove unused parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71996 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Frontend/InitPreprocessor.h | 1 - lib/Frontend/InitPreprocessor.cpp | 1 - tools/clang-cc/clang-cc.cpp | 10 ++++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/clang/Frontend/InitPreprocessor.h b/include/clang/Frontend/InitPreprocessor.h index a51498b194..3943289f9d 100644 --- a/include/clang/Frontend/InitPreprocessor.h +++ b/include/clang/Frontend/InitPreprocessor.h @@ -63,7 +63,6 @@ public: /// environment ready to process a single file. This returns true on error. /// bool InitializePreprocessor(Preprocessor &PP, - const std::string &InFile, const PreprocessorInitOptions& InitOptions); } // end namespace clang diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index 102f385f7e..1ad9d5c8d3 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -429,7 +429,6 @@ static void InitializePredefinedMacros(const TargetInfo &TI, /// environment ready to process a single file. This returns true on error. /// bool InitializePreprocessor(Preprocessor &PP, - const std::string &InFile, const PreprocessorInitOptions& InitOpts) { std::vector PredefineBuffer; diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp index a7f65902d8..588ed2f76a 100644 --- a/tools/clang-cc/clang-cc.cpp +++ b/tools/clang-cc/clang-cc.cpp @@ -1318,7 +1318,6 @@ void InitializePreprocessorInitOptions(PreprocessorInitOptions &InitOpts) namespace { class VISIBILITY_HIDDEN DriverPreprocessorFactory : public PreprocessorFactory { - const std::string &InFile; Diagnostic &Diags; const LangOptions &LangInfo; TargetInfo &Target; @@ -1326,11 +1325,10 @@ class VISIBILITY_HIDDEN DriverPreprocessorFactory : public PreprocessorFactory { HeaderSearch &HeaderInfo; public: - DriverPreprocessorFactory(const std::string &infile, - Diagnostic &diags, const LangOptions &opts, + DriverPreprocessorFactory(Diagnostic &diags, const LangOptions &opts, TargetInfo &target, SourceManager &SM, HeaderSearch &Headers) - : InFile(infile), Diags(diags), LangInfo(opts), Target(target), + : Diags(diags), LangInfo(opts), Target(target), SourceMgr(SM), HeaderInfo(Headers) {} @@ -1371,7 +1369,7 @@ public: PreprocessorInitOptions InitOpts; InitializePreprocessorInitOptions(InitOpts); - if (InitializePreprocessor(*PP, InFile, InitOpts)) + if (InitializePreprocessor(*PP, InitOpts)) return 0; std::string ErrStr; @@ -2019,7 +2017,7 @@ int main(int argc, char **argv) { InitializeIncludePaths(argv[0], HeaderInfo, FileMgr, LangInfo); // Set up the preprocessor with these options. - DriverPreprocessorFactory PPFactory(InFile, Diags, LangInfo, *Target, + DriverPreprocessorFactory PPFactory(Diags, LangInfo, *Target, *SourceMgr.get(), HeaderInfo); llvm::OwningPtr PP(PPFactory.CreatePreprocessor()); -- 2.40.0