[Frontend] Honor UserFilesAreVolatile flag getting file buffer in ASTUnit
authorIvan Donchevskii <ivan.donchevskii@qt.io>
Wed, 6 Jun 2018 07:17:26 +0000 (07:17 +0000)
committerIvan Donchevskii <ivan.donchevskii@qt.io>
Wed, 6 Jun 2018 07:17:26 +0000 (07:17 +0000)
commit2ebe3a0240564af7e5ca34faba81cbd8e58af5d5
tree2fb988348886011341e74fdca0d6bb51dffbdeae
parentcb5b004a9b2ed3e3d0d1636628549bfc0fbe6716
[Frontend] Honor UserFilesAreVolatile flag getting file buffer in ASTUnit

Do not memory map the main file if the flag UserFilesAreVolatile is set to true
in ASTUnit when calling FileSystem::getBufferForFile.

Differential Revision: https://reviews.llvm.org/D47460

llvm-svn: 334070
clang/include/clang/Basic/FileManager.h
clang/lib/Basic/FileManager.cpp
clang/lib/Frontend/ASTUnit.cpp
clang/unittests/Frontend/ASTUnitTest.cpp