1 //===- Version.cpp - Clang Version Number -----------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines several version-related utility functions for Clang.
12 //===----------------------------------------------------------------------===//
19 const char *getClangSubversionPath() {
20 static const char *Path = 0;
24 static char URL[] = "$URL: http://llvm.org/svn/llvm-project/cfe/trunk/lib/Basic/Version.cpp $";
25 char *End = strstr(URL, "/lib/Basic");
29 End = strstr(URL, "/clang/tools/clang");
33 char *Begin = strstr(URL, "cfe/");
44 unsigned getClangSubversionRevision() {
46 // Subversion was not available at build time?
49 return strtol(SVN_REVISION, 0, 10);
53 } // end namespace clang