@@ -290,14 +290,19 @@ class FileManager : public RefCountedBase<FileManager> {
290290
291291 // / Open the specified file as a MemoryBuffer, returning a new
292292 // / MemoryBuffer if successful, otherwise returning null.
293+ // / The IsText parameter controls whether the file should be opened as a text
294+ // / or binary file, and should be set to false if the file contents should be
295+ // / treated as binary.
293296 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
294297 getBufferForFile (FileEntryRef Entry, bool isVolatile = false ,
295- bool RequiresNullTerminator = true , bool IsText = true ,
296- std::optional<int64_t > MaybeLimit = std::nullopt );
298+ bool RequiresNullTerminator = true ,
299+ std::optional<int64_t > MaybeLimit = std::nullopt ,
300+ bool IsText = true );
297301 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
298302 getBufferForFile (StringRef Filename, bool isVolatile = false ,
299- bool RequiresNullTerminator = true , bool IsText = true ,
300- std::optional<int64_t > MaybeLimit = std::nullopt ) const {
303+ bool RequiresNullTerminator = true ,
304+ std::optional<int64_t > MaybeLimit = std::nullopt ,
305+ bool IsText = true ) const {
301306 return getBufferForFileImpl (Filename,
302307 /* FileSize=*/ MaybeLimit.value_or (-1 ),
303308 isVolatile, RequiresNullTerminator, IsText);
0 commit comments