diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-10-11 23:50:34 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-10-11 23:50:34 +0000 |
commit | 48ed37d98eb99587fdabebb88fc7fe2aedfc3b36 (patch) | |
tree | 172697fc86eeb8ed774027fbd7e8ecefa80350b0 /clang/lib/Basic/Version.cpp | |
parent | d097d913b6b0431ba91a7fc868498df79457f406 (diff) | |
download | llvm-48ed37d98eb99587fdabebb88fc7fe2aedfc3b36.zip llvm-48ed37d98eb99587fdabebb88fc7fe2aedfc3b36.tar.gz llvm-48ed37d98eb99587fdabebb88fc7fe2aedfc3b36.tar.bz2 |
Basic: Tweak attempt to make version tags work from 'svn export's again, clip
off the extra parts of the $URL$ SVN keyword.
llvm-svn: 116269
Diffstat (limited to 'clang/lib/Basic/Version.cpp')
-rw-r--r-- | clang/lib/Basic/Version.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp index 545ef53..9367319 100644 --- a/clang/lib/Basic/Version.cpp +++ b/clang/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")); |