forked from OSchip/llvm-project
Make sure the raw_string_ostream gets flushed so we don't accidentally return an empty string.
llvm-svn: 97809
This commit is contained in:
parent
34004170c5
commit
d4870700ad
|
@ -45,7 +45,7 @@ std::string getClangRevision() {
|
|||
std::string revision;
|
||||
llvm::raw_string_ostream OS(revision);
|
||||
OS << strtol(SVN_REVISION, 0, 10);
|
||||
return revision;
|
||||
return OS.str();
|
||||
}
|
||||
#endif
|
||||
return "";
|
||||
|
@ -58,7 +58,7 @@ std::string getClangFullRepositoryVersion() {
|
|||
const std::string &Revision = getClangRevision();
|
||||
if (!Revision.empty())
|
||||
OS << ' ' << Revision;
|
||||
return buf;
|
||||
return OS.str();
|
||||
}
|
||||
|
||||
std::string getClangFullVersion() {
|
||||
|
@ -69,7 +69,7 @@ std::string getClangFullVersion() {
|
|||
#endif
|
||||
OS << "clang version " CLANG_VERSION_STRING " ("
|
||||
<< getClangFullRepositoryVersion() << ')';
|
||||
return buf;
|
||||
return OS.str();
|
||||
}
|
||||
|
||||
} // end namespace clang
|
||||
|
|
Loading…
Reference in New Issue