[Lldb-commits] [PATCH] D74859: [lldb] Fix version string when using LLDB_REVISION but not LLDB_REPOSITORY
Jordan Rupprecht via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 19 12:14:55 PST 2020
rupprecht created this revision.
rupprecht added reviewers: labath, JDevlieghere, friss.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
lldb's format string (line one) is:
`lldb version $clang_version ($lldb_repo revision $lldb_revision)`
When only using $lldb_revision and not $lldb_repo, this might look like:
`lldb version 11 ( revision 12345)`
which looks pretty ugly.
Aside: I'm not sure we really need all the different versions since we've moved to the monorepo layout -- I don't think anyone is using different llvm/clang/lldb revisions, are they? We could likely tidy this up further if we knew how people consumed the output of lldb --version.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74859
Files:
lldb/source/lldb.cpp
Index: lldb/source/lldb.cpp
===================================================================
--- lldb/source/lldb.cpp
+++ lldb/source/lldb.cpp
@@ -50,8 +50,10 @@
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 += "revision ";
g_version_str += lldb_rev;
}
g_version_str += ")";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74859.245485.patch
Type: text/x-patch
Size: 495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200219/329cb26b/attachment.bin>
More information about the lldb-commits
mailing list