[PATCH] D147499: [dsymutil] Disallow --reproducer=Use

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 11:47:09 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2f268b74fdcd: [dsymutil] Disallow --reproducer=Use (authored by keith).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147499/new/

https://reviews.llvm.org/D147499

Files:
  llvm/tools/dsymutil/Options.td
  llvm/tools/dsymutil/dsymutil.cpp


Index: llvm/tools/dsymutil/dsymutil.cpp
===================================================================
--- llvm/tools/dsymutil/dsymutil.cpp
+++ llvm/tools/dsymutil/dsymutil.cpp
@@ -250,14 +250,12 @@
       return ReproducerMode::GenerateOnExit;
     if (S == "GenerateOnCrash")
       return ReproducerMode::GenerateOnCrash;
-    if (S == "Use")
-      return ReproducerMode::Use;
     if (S == "Off")
       return ReproducerMode::Off;
     return make_error<StringError>(
         "invalid reproducer mode: '" + S +
             "'. Supported values are 'GenerateOnExit', 'GenerateOnCrash', "
-            "'Use', 'Off'.",
+            "'Off'.",
         inconvertibleErrorCode());
   }
   return ReproducerMode::GenerateOnCrash;
@@ -613,7 +611,7 @@
 
   auto OptionsOrErr = getOptions(Args);
   if (!OptionsOrErr) {
-    WithColor::error() << toString(OptionsOrErr.takeError());
+    WithColor::error() << toString(OptionsOrErr.takeError()) << '\n';
     return EXIT_FAILURE;
   }
 
@@ -627,7 +625,7 @@
   auto Repro = Reproducer::createReproducer(Options.ReproMode,
                                             Options.ReproducerPath, argc, argv);
   if (!Repro) {
-    WithColor::error() << toString(Repro.takeError());
+    WithColor::error() << toString(Repro.takeError()) << '\n';
     return EXIT_FAILURE;
   }
 
Index: llvm/tools/dsymutil/Options.td
===================================================================
--- llvm/tools/dsymutil/Options.td
+++ llvm/tools/dsymutil/Options.td
@@ -169,7 +169,7 @@
 
 def reproducer: Separate<["--", "-"], "reproducer">,
   MetaVarName<"<mode>">,
-  HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Use', 'Off'.">,
+  HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Off'.">,
   Group<grp_general>;
 def: Joined<["--", "-"], "reproducer=">, Alias<reproducer>;
 
@@ -179,7 +179,7 @@
 
 def use_reproducer: Separate<["--", "-"], "use-reproducer">,
   MetaVarName<"<path>">,
-  HelpText<"Use the object files from the given reproducer path. Alias for --reproducer=Use.">,
+  HelpText<"Use the object files from the given reproducer path.">,
   Group<grp_general>;
 def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147499.510872.patch
Type: text/x-patch
Size: 2304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230404/01b9453b/attachment.bin>


More information about the llvm-commits mailing list