perry-ca wrote: > > sorry this is same as #107906 (with a bigger impact radius, as you're also > > changing getBufferForFile) and doesn't address any of the issues mention > > about explaining the semantics of `IsText` or justification for changing > > the core VFS interfaces, for an operation that's can solely be performed on > > physical fileystem. > > @perry-ca raised some concerns in #109664 about this functionality > > requiring some context awareness, I don't think any of those is addressed > > by this patch either. Pretty much all of the callers apart from ASTReader > > is just using `IsText = true`. > > To give some context, the problem we are trying to solve initially is that > file opened by `#embed` should not be utf-8 converted.
Correct. The overall/original problem is that we have many places where text files were being read as binary files. Adding the IsText parameter to the openFileForRead() function just like we have in the getFileOrStdin() group of functions solves that problem. It tells the compiler to read files that should be text as text and binary as binary. https://github.com/llvm/llvm-project/pull/110661 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits