[PATCH] D38015: [lit] Use inodes instead of realpaths in the config map

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 20:07:08 PDT 2017


zturner added a comment.

In https://reviews.llvm.org/D38015#874692, @dlj wrote:

> I think the previous logic should have yielded a fairly stable identifier... do you have an example off-hand of a case that fails?
>
> (i.e., I would have expected the call to os.path.realpath() to have done the moral equivalent of looking up a canonical path based on the inode, which normpath() alone won't do.)


I don't have an example of where the former normalization breaks, but it just seemed like this is exactly what inodes were designed for.  Plus if `realpath` is going to look up the inode anyway, might as well use it instead of then converting back into some string.  So I think the code will work either way, I just felt better about having a map of integers instead of a map of strings since there's fewer things that could go wrong.


https://reviews.llvm.org/D38015





More information about the llvm-commits mailing list