diff options
author | Petr Hosek <phosek@chromium.org> | 2019-01-31 07:12:43 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2019-01-31 07:12:43 +0000 |
commit | 12062e06674070df972a3a561705f227e733cb06 (patch) | |
tree | e10ba48613ac87f70c51bab5f06acb21c3548c1f /clang/lib/Basic/Version.cpp | |
parent | 046cac61c19e5d9c6262feb4de8df99e0a3b8248 (diff) | |
download | llvm-12062e06674070df972a3a561705f227e733cb06.zip llvm-12062e06674070df972a3a561705f227e733cb06.tar.gz llvm-12062e06674070df972a3a561705f227e733cb06.tar.bz2 |
Revert "[CMake] Unify scripts for generating VCS headers"
This reverts commits r352729 and r352731: this broke Sanitizer Windows bots
llvm-svn: 352733
Diffstat (limited to 'clang/lib/Basic/Version.cpp')
-rw-r--r-- | clang/lib/Basic/Version.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp index bbaeafe..4ed081d 100644 --- a/clang/lib/Basic/Version.cpp +++ b/clang/lib/Basic/Version.cpp @@ -10,7 +10,6 @@ // //===----------------------------------------------------------------------===// -#include "VCSRevision.h" #include "clang/Basic/Version.h" #include "clang/Basic/LLVM.h" #include "clang/Config/config.h" @@ -18,19 +17,23 @@ #include <cstdlib> #include <cstring> +#ifdef HAVE_SVN_VERSION_INC +# include "SVNVersion.inc" +#endif + namespace clang { std::string getClangRepositoryPath() { #if defined(CLANG_REPOSITORY_STRING) return CLANG_REPOSITORY_STRING; #else -#ifdef CLANG_REPOSITORY - StringRef URL(CLANG_REPOSITORY); +#ifdef SVN_REPOSITORY + StringRef URL(SVN_REPOSITORY); #else StringRef URL(""); #endif - // If the CLANG_REPOSITORY is empty, try to use the SVN keyword. This helps us + // 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. StringRef SVNRepository("$URL$"); if (URL.empty()) { @@ -68,8 +71,8 @@ std::string getLLVMRepositoryPath() { } std::string getClangRevision() { -#ifdef CLANG_REVISION - return CLANG_REVISION; +#ifdef SVN_REVISION + return SVN_REVISION; #else return ""; #endif |