pcc added a comment. Test case? I'd note that this isn't so much about wasted work as it is about correctness -- it is legal (although probably not a good idea) for a filename to contain a backslash on *nix. https://reviews.llvm.org/D26734