diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-01 11:08:04 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-01 11:08:04 +0000 |
commit | 1569ce68681d909594d64f9b056d71f5dd7563bf (patch) | |
tree | 867cbbe32a66fd7d62dd9ce9df23a23fefdb8290 /lib/Frontend/FrontendActions.cpp | |
parent | f5bd02d290ff15268853e0456c130a1afa15e907 (diff) |
Notes
Diffstat (limited to 'lib/Frontend/FrontendActions.cpp')
-rw-r--r-- | lib/Frontend/FrontendActions.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp index 7a7537bce40f..27e194e6f108 100644 --- a/lib/Frontend/FrontendActions.cpp +++ b/lib/Frontend/FrontendActions.cpp @@ -170,7 +170,8 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, OS.reset(CI.createDefaultOutputFile(true, InFile, "bc")); return CreateBackendConsumer(BA, CI.getDiagnostics(), CI.getLangOpts(), - CI.getCodeGenOpts(), CI.getTargetOpts(), InFile, + CI.getCodeGenOpts(), CI.getTargetOpts(), + CI.getFrontendOpts().ShowTimers, InFile, OS.take(), CI.getLLVMContext()); } @@ -192,14 +193,15 @@ void DumpRawTokensAction::ExecuteAction() { SourceManager &SM = PP.getSourceManager(); // Start lexing the specified input file. - Lexer RawLex(SM.getMainFileID(), SM, PP.getLangOptions()); + const llvm::MemoryBuffer *FromFile = SM.getBuffer(SM.getMainFileID()); + Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOptions()); RawLex.SetKeepWhitespaceMode(true); Token RawTok; RawLex.LexFromRawLexer(RawTok); while (RawTok.isNot(tok::eof)) { PP.DumpToken(RawTok, true); - fprintf(stderr, "\n"); + llvm::errs() << "\n"; RawLex.LexFromRawLexer(RawTok); } } @@ -212,7 +214,7 @@ void DumpTokensAction::ExecuteAction() { do { PP.Lex(Tok); PP.DumpToken(Tok, true); - fprintf(stderr, "\n"); + llvm::errs() << "\n"; } while (Tok.isNot(tok::eof)); } @@ -222,8 +224,7 @@ void GeneratePTHAction::ExecuteAction() { CI.getFrontendOpts().OutputFile == "-") { // FIXME: Don't fail this way. // FIXME: Verify that we can actually seek in the given file. - llvm::errs() << "ERROR: PTH requires an seekable file for output!\n"; - ::exit(1); + llvm::llvm_report_error("PTH requires a seekable file for output!"); } llvm::raw_fd_ostream *OS = CI.createDefaultOutputFile(true, getCurrentFile()); |