[Lldb-commits] [PATCH] D88939: [lldb] Remove unused code in GetVersion (NFC)
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 6 18:25:57 PDT 2020
kastiglione created this revision.
kastiglione added reviewers: aprantl, teemperor.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
kastiglione requested review of this revision.
Herald added a subscriber: JDevlieghere.
Small cleanup to `lldb_private::GetVersion()`. In particular, the
`LLDB_REPOSITORY` is not defined anywhere and so will always be null.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88939
Files:
lldb/source/lldb.cpp
Index: lldb/source/lldb.cpp
===================================================================
--- lldb/source/lldb.cpp
+++ 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 += ")";
+ if (lldb_rev) {
+ g_version_str += " (revision " + lldb_rev + ")";
}
std::string clang_rev(clang::getClangRevision());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88939.296572.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201007/403a508c/attachment.bin>
More information about the lldb-commits
mailing list