From ce36ecd5a509af8fc5924d21694df36e8bc94a95 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 5 Nov 2012 22:53:33 +0000 Subject: Frontend: Add support for reading named pipes as the main file. - The whole {File,Source}Manager is built around wanting to pre-determine the size of files, so we can't fit this in naturally. Instead, we handle it like we do STDIN, where we just replace the main file contents upfront. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167419 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/FileManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Basic/FileManager.cpp') diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp index c6b894c7e2..6a0fbf80b9 100644 --- a/lib/Basic/FileManager.cpp +++ b/lib/Basic/FileManager.cpp @@ -57,6 +57,10 @@ FileEntry::~FileEntry() { if (FD != -1) ::close(FD); } +bool FileEntry::isNamedPipe() const { + return FileMode & S_IFIFO; +} + //===----------------------------------------------------------------------===// // Windows. //===----------------------------------------------------------------------===// -- cgit v1.2.3