diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-11 21:44:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-11 21:44:00 +0000 |
commit | ca11f61233b2acc266f371816e48290af4e10528 (patch) | |
tree | e9763a33cec9ebf877a9145cd20f815e5a261515 /lib/Frontend/DependencyFile.cpp | |
parent | 0e0bae8139e25de81f18b6a519783a06f7ba1e25 (diff) |
Sink AttachDependencyFileGen into CreatePreprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/DependencyFile.cpp')
-rw-r--r-- | lib/Frontend/DependencyFile.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Frontend/DependencyFile.cpp b/lib/Frontend/DependencyFile.cpp index 9c311fac62..c7f93595e1 100644 --- a/lib/Frontend/DependencyFile.cpp +++ b/lib/Frontend/DependencyFile.cpp @@ -60,23 +60,23 @@ public: }; } -void clang::AttachDependencyFileGen(Preprocessor *PP, +void clang::AttachDependencyFileGen(Preprocessor &PP, const DependencyOutputOptions &Opts) { if (Opts.Targets.empty()) { - PP->getDiagnostics().Report(diag::err_fe_dependency_file_requires_MT); + PP.getDiagnostics().Report(diag::err_fe_dependency_file_requires_MT); return; } std::string Err; llvm::raw_ostream *OS(new llvm::raw_fd_ostream(Opts.OutputFile.c_str(), Err)); if (!Err.empty()) { - PP->getDiagnostics().Report(diag::err_fe_error_opening) + PP.getDiagnostics().Report(diag::err_fe_error_opening) << Opts.OutputFile << Err; return; } - assert(!PP->getPPCallbacks() && "Preprocessor callbacks already registered!"); - PP->setPPCallbacks(new DependencyFileCallback(PP, OS, Opts)); + assert(!PP.getPPCallbacks() && "Preprocessor callbacks already registered!"); + PP.setPPCallbacks(new DependencyFileCallback(&PP, OS, Opts)); } /// FileMatchesDepCriteria - Determine whether the given Filename should be |