(1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).
(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.
(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.
More cleanup to version string generation pending...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index cc738e6..2593551 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -1400,14 +1400,7 @@
break;
case pch::VERSION_CONTROL_BRANCH_REVISION: {
- unsigned CurRevision = getClangSubversionRevision();
- if (Record[0] && CurRevision && Record[0] != CurRevision) {
- Diag(Record[0] < CurRevision? diag::warn_pch_version_too_old
- : diag::warn_pch_version_too_new);
- return IgnorePCH;
- }
-
- llvm::StringRef CurBranch = getClangRepositoryPath();
+ llvm::StringRef CurBranch = getClangFullRepositoryVersion();
llvm::StringRef PCHBranch(BlobStart, BlobLen);
if (CurBranch != PCHBranch) {
Diag(diag::warn_pch_different_branch) << PCHBranch << CurBranch;