forked from OSchip/llvm-project
Fix bug I introduced with assinging a temporary to a StringRef.
llvm-svn: 96041
This commit is contained in:
parent
1e827fd8ca
commit
8bd0929d41
|
@ -55,7 +55,7 @@ std::string getClangFullRepositoryVersion() {
|
|||
std::string buf;
|
||||
llvm::raw_string_ostream OS(buf);
|
||||
OS << getClangRepositoryPath();
|
||||
llvm::StringRef Revision = getClangRevision();
|
||||
const std::string &Revision = getClangRevision();
|
||||
if (!Revision.empty())
|
||||
OS << ' ' << Revision;
|
||||
return buf;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue