[VirtualFileSystem] InMemoryFileSystem::addFile(): Type and Perms
authorBen Hamilton <benhamilton@google.com>
Thu, 9 Nov 2017 16:01:16 +0000 (16:01 +0000)
committerBen Hamilton <benhamilton@google.com>
Thu, 9 Nov 2017 16:01:16 +0000 (16:01 +0000)
commite5af5bde71e3730a2b5bfca6067764df13abdfc5
treed1731915c9523bb9ff44f4941493bfe89eef8abd
parentd4102df9ad5b4456fc98013d9ef49834ac236b14
[VirtualFileSystem] InMemoryFileSystem::addFile(): Type and Perms

Summary:
This implements a FIXME in InMemoryFileSystem::addFile(), allowing
clients to specify User, Group, Type, and/or Perms when creating a
file in an in-memory filesystem.

New tests included. Ran tests with:

% ninja BasicTests && ./tools/clang/unittests/Basic/BasicTests

Fixes PR#35172 (https://bugs.llvm.org/show_bug.cgi?id=35172)

Reviewers: bkramer, hokein

Reviewed By: bkramer, hokein

Subscribers: alexfh

Differential Revision: https://reviews.llvm.org/D39572

llvm-svn: 317800
clang/include/clang/Basic/VirtualFileSystem.h
clang/lib/Basic/VirtualFileSystem.cpp
clang/unittests/Basic/VirtualFileSystemTest.cpp