diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-11-05 22:53:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-11-05 22:53:33 +0000 |
commit | e2951f48bfb5cbe5d5cbdefaeda43b72a8e7a117 (patch) | |
tree | 225d2d586c89ed911487d96023f5ed9d32a82526 /clang/lib/Basic/FileManager.cpp | |
parent | 2b868e24861138fb792a5d03432bb09d758f8a1c (diff) | |
download | bcm5719-llvm-e2951f48bfb5cbe5d5cbdefaeda43b72a8e7a117.tar.gz bcm5719-llvm-e2951f48bfb5cbe5d5cbdefaeda43b72a8e7a117.zip |
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.
llvm-svn: 167419
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index c6b894c7e2f..6a0fbf80b90 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -57,6 +57,10 @@ FileEntry::~FileEntry() { if (FD != -1) ::close(FD); } +bool FileEntry::isNamedPipe() const { + return FileMode & S_IFIFO; +} + //===----------------------------------------------------------------------===// // Windows. //===----------------------------------------------------------------------===// |