Skip to content

[lldb] Remove unused version defines #1912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions lldb/source/lldb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ static const char *GetLLDBRepository() {
#endif
}

#if LLDB_IS_BUILDBOT_BUILD
static std::string GetBuildDate() {
#if defined(LLDB_BUILD_DATE)
return std::string(LLDB_BUILD_DATE);
#else
return std::string();
#endif
}
#endif

#define QUOTE(str) #str
#define EXPAND_AND_QUOTE(str) QUOTE(str)

Expand All @@ -71,23 +61,14 @@ const char *lldb_private::GetVersion() {
}
g_version_str += ")";
}

#if LLDB_IS_BUILDBOT_BUILD
std::string build_date = GetBuildDate();
if(!build_date.empty())
g_version_str += " (buildbot " + build_date + ")";
#endif

#ifdef LLDB_ENABLE_SWIFT
auto const swift_version = swift::version::getSwiftFullVersion();
g_version_str += "\n" + swift_version;
#endif // LLDB_ENABLE_SWIFT

#else
// getSwiftFullVersion() also prints clang and llvm versions, no
// need to print them again. We keep this code here to not diverge
// too much from upstream.
#undef LLDB_UPSTREAM
#ifdef LLDB_UPSTREAM
std::string clang_rev(clang::getClangRevision());
if (clang_rev.length() > 0) {
g_version_str += "\n clang revision ";
Expand All @@ -98,7 +79,7 @@ const char *lldb_private::GetVersion() {
g_version_str += "\n llvm revision ";
g_version_str += llvm_rev;
}
#endif // LLDB_UPSTREAM
#endif // LLDB_ENABLE_SWIFT
}
return g_version_str.c_str();
}