Skip to content

Commit 0387ef9

Browse files
committed
oops, restore upstream block of code
1 parent 83253b2 commit 0387ef9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lldb/source/lldb.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ const char *lldb_private::GetVersion() {
6565
#ifdef LLDB_ENABLE_SWIFT
6666
auto const swift_version = swift::version::getSwiftFullVersion();
6767
g_version_str += "\n" + swift_version;
68+
#else
69+
// getSwiftFullVersion() also prints clang and llvm versions, no
70+
// need to print them again. We keep this code here to not diverge
71+
// too much from upstream.
72+
std::string clang_rev(clang::getClangRevision());
73+
if (clang_rev.length() > 0) {
74+
g_version_str += "\n clang revision ";
75+
g_version_str += clang_rev;
76+
}
77+
std::string llvm_rev(clang::getLLVMRevision());
78+
if (llvm_rev.length() > 0) {
79+
g_version_str += "\n llvm revision ";
80+
g_version_str += llvm_rev;
81+
}
6882
#endif // LLDB_ENABLE_SWIFT
6983
}
7084
return g_version_str.c_str();

0 commit comments

Comments
 (0)