Fix bug I introduced with assinging a temporary to a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96041 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index f6f4a78..a878df7 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -1414,9 +1414,9 @@
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;
}