summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorCameron Desrochers <cameron@moodycamel.com>2017-09-11 15:03:23 +0000
committerCameron Desrochers <cameron@moodycamel.com>2017-09-11 15:03:23 +0000
commitb5b48db12ed915d2927ba6dc1f9fbe50b342de04 (patch)
tree1f2b4778d1415c22d1865493411782d98367e700 /clang/lib/Format/TokenAnnotator.cpp
parentb092bd321a072f667dd0984fe2b07c144802b1aa (diff)
downloadbcm5719-llvm-b5b48db12ed915d2927ba6dc1f9fbe50b342de04.tar.gz
bcm5719-llvm-b5b48db12ed915d2927ba6dc1f9fbe50b342de04.zip
[PCH] Allow VFS to be used for tests that generate PCH files
When using a virtual file-system (VFS) and a preamble file (PCH) is generated, it is generated on-disk in the real file-system instead of in the VFS (which makes sense, since the VFS is read-only). However, when subsequently reading the generated PCH, the frontend passes through the VFS it has been given -- resulting in an error and a failed parse (since the VFS doesn't contain the PCH; the real filesystem does). This patch fixes that by detecting when a VFS is being used for a parse that needs to work with a PCH file, and creating an overlay VFS that includes the PCH file from the real file-system. This allows tests to be written which make use of both PCH files and a VFS. Differential Revision: https://reviews.llvm.org/D37474 llvm-svn: 312917
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud