diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-11-21 06:08:20 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-11-21 06:08:20 +0000 |
| commit | ad7cdd37b3f99a4d6ea37a71c46aa76a4d1bde54 (patch) | |
| tree | 1d026c3787d34963fe826af2be51eaa4ddce692d | |
| parent | 96327eaa52cb5c6cc783a9429547771d83a2a209 (diff) | |
| download | bcm5719-llvm-ad7cdd37b3f99a4d6ea37a71c46aa76a4d1bde54.tar.gz bcm5719-llvm-ad7cdd37b3f99a4d6ea37a71c46aa76a4d1bde54.zip | |
simplify the Preprocessor ctor.
llvm-svn: 39208
| -rw-r--r-- | clang/Driver/clang.cpp | 10 | ||||
| -rw-r--r-- | clang/Lex/Preprocessor.cpp | 7 | ||||
| -rw-r--r-- | clang/include/clang/Lex/Preprocessor.h | 2 |
3 files changed, 9 insertions, 10 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index ef5bcd34eec..63aadf6e971 100644 --- a/clang/Driver/clang.cpp +++ b/clang/Driver/clang.cpp @@ -839,7 +839,7 @@ static void ProcessInputFile(const std::string &InFile, FileManager &FileMgr = HeaderInfo.getFileMgr(); // Set up the preprocessor with these options. - Preprocessor PP(Diags, LangInfo, Target, FileMgr, SourceMgr, HeaderInfo); + Preprocessor PP(Diags, LangInfo, Target, SourceMgr, HeaderInfo); // Install things like __POWERPC__, __GNUC__, etc into the macro table. std::vector<char> PrologMacros; @@ -935,8 +935,8 @@ static void ProcessInputFile(const std::string &InFile, } if (Stats) { - PP.getIdentifierTable().PrintStats(); PP.PrintStats(); + PP.getIdentifierTable().PrintStats(); std::cerr << "\n"; } } @@ -995,10 +995,10 @@ int main(int argc, char **argv) { std::cerr << NumDiagnostics << " diagnostics generated.\n"; if (Stats) { - // Printed from low-to-high level. - FileMgr.PrintStats(); - SourceMgr.PrintStats(); + // Printed from high-to-low level. HeaderInfo.PrintStats(); + SourceMgr.PrintStats(); + FileMgr.PrintStats(); std::cerr << "\n"; } diff --git a/clang/Lex/Preprocessor.cpp b/clang/Lex/Preprocessor.cpp index ee031691979..b122b0a2e16 100644 --- a/clang/Lex/Preprocessor.cpp +++ b/clang/Lex/Preprocessor.cpp @@ -43,11 +43,10 @@ using namespace clang; //===----------------------------------------------------------------------===// Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, - TargetInfo &target, - FileManager &FM, SourceManager &SM, + TargetInfo &target, SourceManager &SM, HeaderSearch &Headers) - : Diags(diags), Features(opts), Target(target), FileMgr(FM), SourceMgr(SM), - HeaderInfo(Headers), Identifiers(opts), + : Diags(diags), Features(opts), Target(target), FileMgr(Headers.getFileMgr()), + SourceMgr(SM), HeaderInfo(Headers), Identifiers(opts), CurLexer(0), CurDirLookup(0), CurMacroExpander(0), Callbacks(0) { ScratchBuf = new ScratchBuffer(SourceMgr); diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index 2c13bf6ebfd..d1c555af1db 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -113,7 +113,7 @@ class Preprocessor { unsigned NumSkipped; public: Preprocessor(Diagnostic &diags, const LangOptions &opts, TargetInfo &target, - FileManager &FM, SourceManager &SM, HeaderSearch &Headers); + SourceManager &SM, HeaderSearch &Headers); ~Preprocessor(); Diagnostic &getDiagnostics() const { return Diags; } |

