]> granicus.if.org Git - clang/commitdiff
issue a friendlier error if someone tries to send precompiled header to '-' (stdout)
authorGabor Greif <ggreif@gmail.com>
Thu, 26 Nov 2009 14:35:28 +0000 (14:35 +0000)
committerGabor Greif <ggreif@gmail.com>
Thu, 26 Nov 2009 14:35:28 +0000 (14:35 +0000)
this brings the error on
  clang -c foo.h -o -
closer to
  clang -c foo.h -o /dev/null

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89948 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/FrontendActions.cpp

index 3a2f570a7a5c90b4a53c0e45832bf150d90e98e7..653cf8734bac1c896c7172dac8714da6d7eb3551 100644 (file)
@@ -222,7 +222,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";
+    llvm::llvm_report_error("PTH requires an seekable file for output!");
     ::exit(1);
   }
   llvm::raw_fd_ostream *OS =