From: Daniel Dunbar Date: Mon, 11 Oct 2010 23:50:34 +0000 (+0000) Subject: Basic: Tweak attempt to make version tags work from 'svn export's again, clip X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83e18f806087436cb99ad2d044dff04d59d5dd05;p=clang Basic: Tweak attempt to make version tags work from 'svn export's again, clip off the extra parts of the $URL$ SVN keyword. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116269 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Version.cpp b/lib/Basic/Version.cpp index 545ef53e6d..9367319c5f 100644 --- a/lib/Basic/Version.cpp +++ b/lib/Basic/Version.cpp @@ -31,8 +31,10 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. static llvm::StringRef SVNRepository("$URL$"); - if (URL.empty()) - URL = SVNRepository.split(':').second; + if (URL.empty()) { + URL = SVNRepository.slice(SVNRepository.find(':'), + SVNRepository.find("/lib/Basic")); + } // Strip off version from a build from an integration branch. URL = URL.slice(0, URL.find("/src/tools/clang"));