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;
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;
}