[cfe-dev] patch for improving Clang's virtual file handling

Zhanyong Wan (λx.x x) wan at google.com
Mon Feb 7 14:17:44 PST 2011


Hi, Doug,

Per our chat, please review the attached patch Manuel and I wrote for
improving Clang's virtual file handling.  I also uploaded the patch to
http://codereview.appspot.com/4126060 to make it easier to comment on
the individual lines.

This patch contains:

- making some of the existing comments more accurate in the presence
of virtual files/directories.

- renaming some private data members of FileManager to match their roles better.

- creating 'DirectorEntry's for the parent directories of virtual
files, such that we can tell whether two virtual files are from the
same directory.  This is useful for injecting virtual files whose
directories don't exist in the real file system.

- minor clean-ups and adding comments for class
FileManager::UniqueDirContainer and FileManager::UniqueFileContainer.

- adding statistics on virtual files to FileManager::PrintStats().

I didn't add new tests, but all existing tests pass.  I plan to add
the tests in a new patch, as I'm still figuring out how to do that.

Thanks a lot!
-- 
Zhanyong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtual-dir.patch
Type: text/x-patch
Size: 20856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110207/abd1cfab/attachment.bin>


More information about the cfe-dev mailing list