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 | 18e066f6a9b1109cb0d3738cd0e570f79ce896ac (patch) | |
tree | 0bb879757d8367483d453540094a37b7ce915f0b /clang/lib/Frontend/PCHWriter.cpp | |
parent | f5c834fce159386feb5cfa2f2758975fa1f7e6e8 (diff) | |
download | bcm5719-llvm-18e066f6a9b1109cb0d3738cd0e570f79ce896ac.tar.gz bcm5719-llvm-18e066f6a9b1109cb0d3738cd0e570f79ce896ac.zip |
(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...
llvm-svn: 94231
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHWriter.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index d1aa1d8b500..9909c95847e 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -707,16 +707,15 @@ void PCHWriter::WriteMetadata(ASTContext &Context, const char *isysroot) { Stream.EmitRecordWithBlob(FileAbbrevCode, Record, MainFileNameStr); } - // Subversion branch/version information. - BitCodeAbbrev *SvnAbbrev = new BitCodeAbbrev(); - SvnAbbrev->Add(BitCodeAbbrevOp(pch::VERSION_CONTROL_BRANCH_REVISION)); - SvnAbbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // SVN revision - SvnAbbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // SVN branch/tag - unsigned SvnAbbrevCode = Stream.EmitAbbrev(SvnAbbrev); + // Repository branch/version information. + BitCodeAbbrev *RepoAbbrev = new BitCodeAbbrev(); + RepoAbbrev->Add(BitCodeAbbrevOp(pch::VERSION_CONTROL_BRANCH_REVISION)); + RepoAbbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // SVN branch/tag + unsigned RepoAbbrevCode = Stream.EmitAbbrev(RepoAbbrev); Record.clear(); Record.push_back(pch::VERSION_CONTROL_BRANCH_REVISION); - Record.push_back(getClangSubversionRevision()); - Stream.EmitRecordWithBlob(SvnAbbrevCode, Record, getClangRepositoryPath()); + Stream.EmitRecordWithBlob(RepoAbbrevCode, Record, + getClangFullRepositoryVersion()); } /// \brief Write the LangOptions structure. |