From: Douglas Gregor Date: Thu, 5 Nov 2009 23:46:05 +0000 (+0000) Subject: Strip off the /clang/tools/clang at the end of the Subversion URL, if it's there X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fbf1f0052d6758774e565039ba69780295eb8dd;p=clang Strip off the /clang/tools/clang at the end of the Subversion URL, if it's there git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86195 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Version.cpp b/lib/Basic/Version.cpp index 9699ee416b..18a8a88810 100644 --- a/lib/Basic/Version.cpp +++ b/lib/Basic/Version.cpp @@ -26,6 +26,10 @@ const char *getClangSubversionPath() { if (End) *End = 0; + End = strstr(URL, "/clang/tools/clang"); + if (End) + *End = 0; + char *Begin = strstr(URL, "cfe/"); if (Begin) { Path = Begin + 4;