This is an archive of the discontinued LLVM Phabricator instance.

Remove some SVN-specific code.
ClosedPublic

Authored by thakis on Jan 16 2020, 7:36 AM.

Details

Summary

$URL$ is an SVN keyword substitution enabled via
svn propset svn:keywords "URL" tools/clang/lib/Basic/Version.cpp.
Now that we no longer use SVN, it's no longer being replaced by
anything, and we no longer offer svn exports. So remove the
$URL$-specific logic.

The "cfe" path prefix removal also no longer makes sense now that
we're on git: Both CLANG_REPOSITORY and LLVM_REPOSITORY are usually
set to https://github.com/llvm/llvm-project.git

So remove that too, and remove the "llvm" prefix removal for symmetry.
With the github url, "llvm" _is_ found in the string, but not in
the place the function expected. Nobody noticed since the llvm
repository path is only used if CLANG_REVISION and LLVM_REVISION are
different, which in the git monorepo world they never should be.
(I might remove the "// Support LLVM in a separate repository"
block in a separate commit.)

Diff Detail

Event Timeline

thakis created this revision.Jan 16 2020, 7:36 AM
hans accepted this revision.Jan 16 2020, 7:41 AM
This revision is now accepted and ready to land.Jan 16 2020, 7:41 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2020, 8:09 AM
Eugene.Zelenko added inline comments.
clang/lib/Basic/Version.cpp
33

return {} should be better.

42

return {} should be better.

50

return {} should be better.

hans added inline comments.Jan 17 2020, 1:14 AM
clang/lib/Basic/Version.cpp
33

Why? I think "" is clearer for a string.

clang/lib/Basic/Version.cpp
33

It's default non-trivial object initialization. Also not need for implicit cast.

hans added inline comments.Jan 21 2020, 10:07 AM
clang/lib/Basic/Version.cpp
33

I still think

return "";

is a much clearer way of returning an empty string.