[llvm] [llvm-debuginfod-find] Fix help text regression (PR #110752)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 15:02:35 PDT 2024


https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/110752

>From 8fb42e6278d3f4c33c7b1e5b077e82a421f952f9 Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Tue, 1 Oct 2024 14:53:34 -0700
Subject: [PATCH 1/3] [llvm-debuginfod-find] Fix help text regression

While porting the tool from using cl:opt to OptTable, I had mistakenly
deleted the help text header that was originally part of the tool.
Bringing it back in this patch.
---
 llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
index 699fcf8a7dbcd6..e3f3a82d7636cc 100644
--- a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
+++ b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
@@ -79,7 +79,13 @@ static void parseArgs(int argc, char **argv) {
   if (Args.hasArg(OPT_help)) {
     Tbl.printHelp(llvm::outs(),
                   "llvm-debuginfod-find [options] <input build_id>",
-                  ToolName.str().c_str());
+                   "llvm-debuginfod-find: Fetch debuginfod artifacts\n\n"
+      "This program is a frontend to the debuginfod client library. The cache "
+      "directory, request timeout (in seconds), and debuginfod server urls are "
+      "set by these environment variables:\n"
+      "DEBUGINFOD_CACHE_PATH (default set by sys::path::cache_directory)\n"
+      "DEBUGINFOD_TIMEOUT (defaults to 90s)\n"
+      "DEBUGINFOD_URLS=[comma separated URLs] (defaults to empty)\n");
     std::exit(0);
   }
 

>From d13cf32e08b1bc543ee19c0e5ebf2935d6446f10 Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Tue, 1 Oct 2024 14:57:10 -0700
Subject: [PATCH 2/3] Fix formatting.

---
 .../llvm-debuginfod-find.cpp                  | 20 ++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
index e3f3a82d7636cc..03cfac071bbd25 100644
--- a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
+++ b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
@@ -77,15 +77,17 @@ static void parseArgs(int argc, char **argv) {
       });
 
   if (Args.hasArg(OPT_help)) {
-    Tbl.printHelp(llvm::outs(),
-                  "llvm-debuginfod-find [options] <input build_id>",
-                   "llvm-debuginfod-find: Fetch debuginfod artifacts\n\n"
-      "This program is a frontend to the debuginfod client library. The cache "
-      "directory, request timeout (in seconds), and debuginfod server urls are "
-      "set by these environment variables:\n"
-      "DEBUGINFOD_CACHE_PATH (default set by sys::path::cache_directory)\n"
-      "DEBUGINFOD_TIMEOUT (defaults to 90s)\n"
-      "DEBUGINFOD_URLS=[comma separated URLs] (defaults to empty)\n");
+    Tbl.printHelp(
+        llvm::outs(), "llvm-debuginfod-find [options] <input build_id>",
+        "llvm-debuginfod-find: Fetch debuginfod artifacts\n\n"
+        "This program is a frontend to the debuginfod client library. The "
+        "cache "
+        "directory, request timeout (in seconds), and debuginfod server urls "
+        "are "
+        "set by these environment variables:\n"
+        "DEBUGINFOD_CACHE_PATH (default set by sys::path::cache_directory)\n"
+        "DEBUGINFOD_TIMEOUT (defaults to 90s)\n"
+        "DEBUGINFOD_URLS=[comma separated URLs] (defaults to empty)\n");
     std::exit(0);
   }
 

>From dbd4de5e3955ccffc68c4aed44e73cd5f3b4e2b2 Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Tue, 1 Oct 2024 14:59:16 -0700
Subject: [PATCH 3/3] Fix formatting

---
 llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
index 03cfac071bbd25..0b2968b1bec354 100644
--- a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
+++ b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
@@ -81,13 +81,11 @@ static void parseArgs(int argc, char **argv) {
         llvm::outs(), "llvm-debuginfod-find [options] <input build_id>",
         "llvm-debuginfod-find: Fetch debuginfod artifacts\n\n"
         "This program is a frontend to the debuginfod client library. The "
-        "cache "
-        "directory, request timeout (in seconds), and debuginfod server urls "
-        "are "
-        "set by these environment variables:\n"
+        "cache directory, request timeout (in seconds), and debuginfod server "
+        "urls are set by these environment variables:\n"
         "DEBUGINFOD_CACHE_PATH (default set by sys::path::cache_directory)\n"
         "DEBUGINFOD_TIMEOUT (defaults to 90s)\n"
-        "DEBUGINFOD_URLS=[comma separated URLs] (defaults to empty)\n");
+        "DEBUGINFOD_URLS=[comma separated URLs] (defaults to empty)");
     std::exit(0);
   }
 



More information about the llvm-commits mailing list