|
45 | 45 | #endif
|
46 | 46 |
|
47 | 47 | #include "LLVMRevision.inc"
|
48 |
| -#include "ClangRevision.inc" |
49 | 48 | #include "SwiftRevision.inc"
|
50 | 49 |
|
51 | 50 | namespace swift {
|
52 | 51 | namespace version {
|
53 | 52 |
|
54 |
| -/// Print a string of the form "LLVM xxxxx, Clang yyyyy, Swift zzzzz", |
55 |
| -/// where each placeholder is the revision for the associated repository. |
| 53 | +/// Print a string of the form "LLVM xxxxx, Swift zzzzz", where each placeholder |
| 54 | +/// is the revision for the associated repository. |
56 | 55 | static void printFullRevisionString(raw_ostream &out) {
|
57 |
| - // Arbitrarily truncate to 10 characters. This should be enough to unique |
58 |
| - // Git hashes for the time being, and certainly enough for SVN revisions, |
59 |
| - // while keeping the version string from being ridiculously long. |
| 56 | + // Arbitrarily truncate to 15 characters. This should be enough to unique Git |
| 57 | + // hashes while keeping the REPL version string from overflowing 80 columns. |
60 | 58 | #if defined(LLVM_REVISION)
|
61 |
| - out << "LLVM " << StringRef(LLVM_REVISION).slice(0, 10); |
62 |
| -# if defined(CLANG_REVISION) || defined(SWIFT_REVISION) |
63 |
| - out << ", "; |
64 |
| -# endif |
65 |
| -#endif |
66 |
| - |
67 |
| -#if defined(CLANG_REVISION) |
68 |
| - out << "Clang " << StringRef(CLANG_REVISION).slice(0, 10); |
| 59 | + out << "LLVM " << StringRef(LLVM_REVISION).slice(0, 15); |
69 | 60 | # if defined(SWIFT_REVISION)
|
70 | 61 | out << ", ";
|
71 | 62 | # endif
|
72 | 63 | #endif
|
73 | 64 |
|
74 | 65 | #if defined(SWIFT_REVISION)
|
75 |
| - out << "Swift " << StringRef(SWIFT_REVISION).slice(0, 10); |
| 66 | + out << "Swift " << StringRef(SWIFT_REVISION).slice(0, 15); |
76 | 67 | #endif
|
77 | 68 | }
|
78 | 69 |
|
@@ -424,8 +415,7 @@ std::string getSwiftFullVersion(Version effectiveVersion) {
|
424 | 415 | OS << " clang-" CLANG_COMPILER_VERSION;
|
425 | 416 | #endif
|
426 | 417 | OS << ")";
|
427 |
| -#elif defined(LLVM_REVISION) || defined(CLANG_REVISION) || \ |
428 |
| - defined(SWIFT_REVISION) |
| 418 | +#elif defined(LLVM_REVISION) || defined(SWIFT_REVISION) |
429 | 419 | OS << " (";
|
430 | 420 | printFullRevisionString(OS);
|
431 | 421 | OS << ")";
|
|
0 commit comments