[PATCH] D47460: [Frontend] Honor UserFilesAreVolatile flag getting file buffer in ASTUnit

Ivan Donchevskii via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 4 01:37:38 PDT 2018


yvvan updated this revision to Diff 149683.
yvvan added a comment.

I could not properly test getMainBufferWithPrecompiledPreamble because it's private and requires some extra context to be called.

But there's another getBufferForFile call in ASTUnit which has similar symptoms and might cause wrong mmap behavior. I've also appended it with the same parameter 'UserFilesAreVolatile' and added unit-test for it.


https://reviews.llvm.org/D47460

Files:
  include/clang/Basic/FileManager.h
  lib/Basic/FileManager.cpp
  lib/Frontend/ASTUnit.cpp
  unittests/Frontend/ASTUnitTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47460.149683.patch
Type: text/x-patch
Size: 7591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180604/bd83c6e9/attachment.bin>


More information about the cfe-commits mailing list