diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-05-05 21:57:46 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-05-05 21:57:46 +0000 |
commit | 26d56393c602df63526e878dbc5cca453601e9c5 (patch) | |
tree | 8b0369ca454315749ef93e13048368e10de04a93 /clang/lib/Basic/FileManager.cpp | |
parent | 20a92ae3d2110ea6acbd9bbb3e9ecd2064bc34b5 (diff) | |
download | bcm5719-llvm-26d56393c602df63526e878dbc5cca453601e9c5.tar.gz bcm5719-llvm-26d56393c602df63526e878dbc5cca453601e9c5.zip |
[Basic/FileManager] Propagate whether a file 'IsVolatile' to the file opening functions.
Needs llvm r208007.
llvm-svn: 208008
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index 579c8185b3d..5d7d9390d29 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -391,7 +391,8 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr, const char *Filename = Entry->getName(); // If the file is already open, use the open file descriptor. if (Entry->File) { - ec = Entry->File->getBuffer(Filename, Result, FileSize); + ec = Entry->File->getBuffer(Filename, Result, FileSize, + /*RequiresNullTerminator=*/true, isVolatile); if (ErrorStr) *ErrorStr = ec.message(); Entry->closeFile(); @@ -401,7 +402,8 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr, // Otherwise, open the file. if (FileSystemOpts.WorkingDir.empty()) { - ec = FS->getBufferForFile(Filename, Result, FileSize); + ec = FS->getBufferForFile(Filename, Result, FileSize, + /*RequiresNullTerminator=*/true, isVolatile); if (ec && ErrorStr) *ErrorStr = ec.message(); return Result.release(); @@ -409,7 +411,8 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr, SmallString<128> FilePath(Entry->getName()); FixupRelativePath(FilePath); - ec = FS->getBufferForFile(FilePath.str(), Result, FileSize); + ec = FS->getBufferForFile(FilePath.str(), Result, FileSize, + /*RequiresNullTerminator=*/true, isVolatile); if (ec && ErrorStr) *ErrorStr = ec.message(); return Result.release(); |