[FileManager] Don't crash if reading from stdin and stat(".") fails
[FileManager] Don't crash if reading from stdin and stat(".") fails

addAncestorsAsVirtualDirs("<stdin>") quickly returns without doing work
because "<stdin>" has no parent_path.  This violates the expectation
that a subsequent call to getDirectoryFromFile("<stdin>") would succeed.
Instead, it fails because it uses the "." if the file has no path
component.

Fix this by keeping the behavior between addAncestorsAsVirtualDirs and
getDirectoryFromFile symmetric.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@266089 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 8250364e5008fd7a8c0109022d60fd62698838d9)

apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang