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 += ")";


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 += ")";
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to