diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-04-13 08:43:31 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-04-13 08:43:31 +0000 |
commit | 90a4877e31f104f3a824cc5aface63e2139abe1d (patch) | |
tree | 04557e078fe532e41c27cd2ddff0f0cb03f08659 /clang/lib/Frontend/FrontendActions.cpp | |
parent | da46480c4dc741f9a55b4884700285110255ded6 (diff) | |
download | bcm5719-llvm-90a4877e31f104f3a824cc5aface63e2139abe1d.tar.gz bcm5719-llvm-90a4877e31f104f3a824cc5aface63e2139abe1d.zip |
Revert r234620 and others, "Actually check if lseek works instead of using a filename based heuristic." It was affected by r234615, which was reverted in r234721.
r234620, "Actually check if lseek works instead of using a filename based heuristic."
r234621, "Testcase for the previous commit."
r234718, "Suppress clang/test/PCH/emit-pth.c on win32, for now while investigating."
llvm-svn: 234730
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 1acaf6862e3..aa6e1732bae 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -599,15 +599,15 @@ void DumpTokensAction::ExecuteAction() { void GeneratePTHAction::ExecuteAction() { CompilerInstance &CI = getCompilerInstance(); - llvm::raw_fd_ostream *OS = - CI.createDefaultOutputFile(true, getCurrentFile()); - if (!OS) - return; - - if (!OS->supportsSeeking()) { + if (CI.getFrontendOpts().OutputFile.empty() || + CI.getFrontendOpts().OutputFile == "-") { // FIXME: Don't fail this way. + // FIXME: Verify that we can actually seek in the given file. llvm::report_fatal_error("PTH requires a seekable file for output!"); } + llvm::raw_fd_ostream *OS = + CI.createDefaultOutputFile(true, getCurrentFile()); + if (!OS) return; CacheTokens(CI.getPreprocessor(), OS); } |