diff --git a/lldb/source/lldb.cpp b/lldb/source/lldb.cpp --- a/lldb/source/lldb.cpp +++ b/lldb/source/lldb.cpp @@ -25,17 +25,6 @@ #endif } -static const char *GetLLDBRepository() { -#ifdef LLDB_REPOSITORY - return LLDB_REPOSITORY; -#else - return NULL; -#endif -} - -#define QUOTE(str) #str -#define EXPAND_AND_QUOTE(str) QUOTE(str) - const char *lldb_private::GetVersion() { // On platforms other than Darwin, report a version number in the same style // as the clang tool. @@ -44,19 +33,9 @@ g_version_str += "lldb version "; g_version_str += CLANG_VERSION_STRING; - const char *lldb_repo = GetLLDBRepository(); - const char *lldb_rev = GetLLDBRevision(); - if (lldb_repo || lldb_rev) { - g_version_str += " ("; - if (lldb_repo) - g_version_str += lldb_repo; - if (lldb_repo && lldb_rev) - g_version_str += " "; - if (lldb_rev) { - g_version_str += "revision "; - g_version_str += lldb_rev; - } - g_version_str += ")"; + std::string lldb_rev(GetLLDBRevision()); + if (!lldb_rev.empty()) { + g_version_str += " (revision " + lldb_rev + ")"; } std::string clang_rev(clang::getClangRevision());