In llvm::MemoryBuffer::getFile() remove an unnecessary stat call check.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 1 Mar 2013 22:48:51 +0000 (22:48 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 1 Mar 2013 22:48:51 +0000 (22:48 +0000)
commitdb4443f7af005588d4fd0df5669a2a2ee21fac11
tree581cad2b4311f984988f97f3f554a8c835b9a87d
parent1ed16946431822d2f787346359d62750149c8028
In llvm::MemoryBuffer::getFile() remove an unnecessary stat call check.

The sys::fs::is_directory() check is unnecessary because, if the filename is
a directory, the function will fail anyway with the same error code returned.
Remove the check to avoid an unnecessary stat call.

Someone needs to review on windows and see if the check is necessary there or not.

llvm-svn: 176386
llvm/lib/Support/MemoryBuffer.cpp