diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-15 20:52:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-15 20:52:01 +0000 |
commit | 8ea26d6a80df408a4fe6aca69745f87610fe7234 (patch) | |
tree | 162eb849c1dc5de56dbb419174e955a0688be12e /llvm/lib/Support | |
parent | 1c682f0f0c5bd24c8886894daf87cba1b37645e4 (diff) | |
download | bcm5719-llvm-8ea26d6a80df408a4fe6aca69745f87610fe7234.tar.gz bcm5719-llvm-8ea26d6a80df408a4fe6aca69745f87610fe7234.zip |
Remove an extra is_directory call.
I checked that opening a directory on windows does fail, so this saves a "stat".
llvm-svn: 186345
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/MemoryBuffer.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp index b8df7a4f143..a7553d1c961 100644 --- a/llvm/lib/Support/MemoryBuffer.cpp +++ b/llvm/lib/Support/MemoryBuffer.cpp @@ -253,17 +253,6 @@ error_code MemoryBuffer::getFile(const char *Filename, OwningPtr<MemoryBuffer> &result, int64_t FileSize, bool RequiresNullTerminator) { - // FIXME: Review if this check is unnecessary on windows as well. -#ifdef LLVM_ON_WIN32 - // First check that the "file" is not a directory - bool is_dir = false; - error_code err = sys::fs::is_directory(Filename, is_dir); - if (err) - return err; - if (is_dir) - return make_error_code(errc::is_a_directory); -#endif - int OpenFlags = O_RDONLY; #ifdef O_BINARY OpenFlags |= O_BINARY; // Open input file in binary mode on win32. |