]> granicus.if.org Git - clang/commit
Add a 'use-external-names' option to VFS overlay files
authorBen Langmuir <blangmuir@apple.com>
Thu, 27 Feb 2014 00:25:12 +0000 (00:25 +0000)
committerBen Langmuir <blangmuir@apple.com>
Thu, 27 Feb 2014 00:25:12 +0000 (00:25 +0000)
commite40e43d033f12cba6b6bbd88a978d10f1e79fb86
tree6c66f2e313a5792ec811b9bdc4658f872e5ce065
parent05a09c8f63fb61abaeb1e3bb4da9db87aaa4ec8d
Add a 'use-external-names' option to VFS overlay files

When true, sets the name of the file to be the name from
'external-contents'. Otherwise, you get the virtual path that the file
was looked up by. This will not affect any non-virtual paths, or fully
virtual paths (for which there is no reasonable 'external' name anyway).

The setting is available globally, but can be overriden on a per-file
basis.

The goal is that this setting will control which path you see in debug
info, diagnostics, etc. which are sensitive to which path is used. That
will come in future patches that pass the name through to FileManager.

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