summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Version.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-10-11 23:44:19 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-10-11 23:44:19 +0000
commitd097d913b6b0431ba91a7fc868498df79457f406 (patch)
tree5b7e984edd7202f9b2954d55733e01c9001efcc0 /clang/lib/Basic/Version.cpp
parente790afcbe1e3226e4e496934d8523866c3258c7d (diff)
downloadbcm5719-llvm-d097d913b6b0431ba91a7fc868498df79457f406.tar.gz
bcm5719-llvm-d097d913b6b0431ba91a7fc868498df79457f406.zip
Basic: Attempt to make version tags work from 'svn export's again.
llvm-svn: 116268
Diffstat (limited to 'clang/lib/Basic/Version.cpp')
-rw-r--r--clang/lib/Basic/Version.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp
index 67c6c36c921..545ef53e6d8 100644
--- a/clang/lib/Basic/Version.cpp
+++ b/clang/lib/Basic/Version.cpp
@@ -28,6 +28,12 @@ std::string getClangRepositoryPath() {
llvm::StringRef URL("");
#endif
+ // 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;
+
// Strip off version from a build from an integration branch.
URL = URL.slice(0, URL.find("/src/tools/clang"));
OpenPOWER on IntegriCloud