]> granicus.if.org Git - clang/commit
Allow multi-component paths in VFS file nodes
authorBen Langmuir <blangmuir@apple.com>
Tue, 25 Feb 2014 04:34:14 +0000 (04:34 +0000)
committerBen Langmuir <blangmuir@apple.com>
Tue, 25 Feb 2014 04:34:14 +0000 (04:34 +0000)
commit2e63a1199a29ddc68a15c6fdf0809b293d264973
tree61ef49d3c2871cd5aa15fba0f383a4b8e6f2885c
parent0a8b98b4148ad46f3c02cab24c4437ca57b1d5b0
Allow multi-component paths in VFS file nodes

This allows the 'name' field to contain a path, like

{ 'type': 'directory',
  'name': '/path/to/dir',
  'contents': [ ... ] }

which not only simplifies reading and writing these files (for humans),
but makes it possible to easily modify locations via textual
replacement, which would not have worked in the old scheme.

E.g. sed s:<ROOT>:<NEW ROOT>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202109 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/VirtualFileSystem.cpp
unittests/Basic/VirtualFileSystemTest.cpp