Deleted Added
full compact
Version.cpp (204643) Version.cpp (204793)
1//===- Version.cpp - Clang Version Number -----------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 31 unchanged lines hidden (view full) ---

40}
41
42std::string getClangRevision() {
43#ifdef SVN_REVISION
44 if (SVN_REVISION[0] != '\0') {
45 std::string revision;
46 llvm::raw_string_ostream OS(revision);
47 OS << strtol(SVN_REVISION, 0, 10);
1//===- Version.cpp - Clang Version Number -----------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 31 unchanged lines hidden (view full) ---

40}
41
42std::string getClangRevision() {
43#ifdef SVN_REVISION
44 if (SVN_REVISION[0] != '\0') {
45 std::string revision;
46 llvm::raw_string_ostream OS(revision);
47 OS << strtol(SVN_REVISION, 0, 10);
48 return revision;
48 return OS.str();
49 }
50#endif
51 return "";
52}
53
54std::string getClangFullRepositoryVersion() {
55 std::string buf;
56 llvm::raw_string_ostream OS(buf);
57 OS << getClangRepositoryPath();
58 const std::string &Revision = getClangRevision();
59 if (!Revision.empty())
60 OS << ' ' << Revision;
49 }
50#endif
51 return "";
52}
53
54std::string getClangFullRepositoryVersion() {
55 std::string buf;
56 llvm::raw_string_ostream OS(buf);
57 OS << getClangRepositoryPath();
58 const std::string &Revision = getClangRevision();
59 if (!Revision.empty())
60 OS << ' ' << Revision;
61 return buf;
61 return OS.str();
62}
63
64std::string getClangFullVersion() {
65 std::string buf;
66 llvm::raw_string_ostream OS(buf);
67#ifdef CLANG_VENDOR
68 OS << CLANG_VENDOR;
69#endif
70 OS << "clang version " CLANG_VERSION_STRING " ("
71 << getClangFullRepositoryVersion() << ')';
62}
63
64std::string getClangFullVersion() {
65 std::string buf;
66 llvm::raw_string_ostream OS(buf);
67#ifdef CLANG_VENDOR
68 OS << CLANG_VENDOR;
69#endif
70 OS << "clang version " CLANG_VERSION_STRING " ("
71 << getClangFullRepositoryVersion() << ')';
72 return buf;
72 return OS.str();
73}
74
75} // end namespace clang
73}
74
75} // end namespace clang