Fix bug I introduced with assinging a temporary to a StringRef.

llvm-svn: 96041
This commit is contained in:
Ted Kremenek
2010-02-12 23:31:14 +00:00
parent 1e827fd8ca
commit 8bd0929d41
2 changed files with 3 additions and 3 deletions

View File

@@ -1414,9 +1414,9 @@ PCHReader::ReadPCHBlock() {
break;
case pch::VERSION_CONTROL_BRANCH_REVISION: {
llvm::StringRef CurBranch = getClangFullRepositoryVersion();
const std::string &CurBranch = getClangFullRepositoryVersion();
llvm::StringRef PCHBranch(BlobStart, BlobLen);
if (CurBranch != PCHBranch) {
if (llvm::StringRef(CurBranch) != PCHBranch) {
Diag(diag::warn_pch_different_branch) << PCHBranch << CurBranch;
return IgnorePCH;
}