[PATCH] D43165: [lit] Fix problem in how Python versions open files with different encodings

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 13:25:18 PST 2018


zturner added a comment.

I checked the code and this happens indirectly inside of a call to `compareDirectoryTrees`.  So indeed, it would be hard to explicitly request a binary diff.  Instead, could we //detect// if a file is binary, and if it is fall back to a binary diff?  For example, using code like this <http://code.activestate.com/recipes/173220/>.  We could put this in a function named `lit.util.is_binary(file)` and inside of `compareDirectoryTrees` we could call this function and then branch to the appropriate diff function.

Thoughts?


Repository:
  rL LLVM

https://reviews.llvm.org/D43165





More information about the llvm-commits mailing list