r234730 - 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.
NAKAMURA Takumi
geek4civic at gmail.com
Mon Apr 13 01:43:32 PDT 2015
Author: chapuni
Date: Mon Apr 13 03:43:31 2015
New Revision: 234730
URL: http://llvm.org/viewvc/llvm-project?rev=234730&view=rev
Log:
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."
Removed:
cfe/trunk/test/PCH/emit-pth.c
Modified:
cfe/trunk/lib/Frontend/FrontendActions.cpp
Modified: cfe/trunk/lib/Frontend/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendActions.cpp?rev=234730&r1=234729&r2=234730&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendActions.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendActions.cpp Mon Apr 13 03:43:31 2015
@@ -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);
}
Removed: cfe/trunk/test/PCH/emit-pth.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/emit-pth.c?rev=234729&view=auto
==============================================================================
--- cfe/trunk/test/PCH/emit-pth.c (original)
+++ cfe/trunk/test/PCH/emit-pth.c (removed)
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o %t1 %s
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o - %s > %t2
-// RUN: cmp %t1 %t2
-// RUN: not %clang_cc1 -triple i386-unknown-unknown -emit-pth -o - %s 2>&1 | \
-// RUN: FileCheck %s
-
-// CHECK: PTH requires a seekable file for output!
-
-// MSVCRT's _lseek(SEEK_CUR) doesn't return -1 for raw_ostream::SupportSeeking.
-// REQUIRES: shell
More information about the cfe-commits
mailing list