diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-01-22 22:12:47 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-01-22 22:12:47 +0000 |
commit | f7a96a39958b3f919f26764777eec948b43d74bc (patch) | |
tree | ba5b7f7dfe1695d6fb5496095a0a2a1f06be96f9 /lib/Frontend/PCHReader.cpp | |
parent | e07b6e58d3a23803f537ba861298475c1eb65eab (diff) |
(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
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index cc738e6fb9..259355145a 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -1400,14 +1400,7 @@ PCHReader::ReadPCHBlock() { 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; |