Previously, there were two different scripts for generating VCS headers:
one used by LLVM and one used by Clang. They were both similar, but
different. They were both broken in their own ways, for example the one
used by Clang didn't properly handle monorepo resulting in an incorrect
version information reported by Clang, while the one used by LLVM didn't
support more than one repository which is needed in the case that Clang
is checked out separately.
This change unifies two the scripts by introducing a new script that's
used from both LLVM and Clang, ensures that the new script supports both
monorepo and standalone SVN and Git setups, and removes the old scripts.
Please disregard if you think it's not worth the effort right now but… I'm wondering if you could also move this part of the logic to GenerateVersionfromVCS. I mean, the contents resemble those that you are generating inside that script, and you're basically repeating this whole conditional part in both call sites. I suppose you could alos kill the .undef file, and just call GenerateVersionfromVCS unconditionally, presuming it'll either generate revision data or undefs.