Skip to content

Commit 2f268b7

Browse files
committed
[dsymutil] Disallow --reproducer=Use
This should be implied by --use-reproducer instead as a path is required for this mode Differential Revision: https://reviews.llvm.org/D147499
1 parent 282b8ac commit 2f268b7

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

llvm/tools/dsymutil/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def: Separate<["-"], "j">,
169169

170170
def reproducer: Separate<["--", "-"], "reproducer">,
171171
MetaVarName<"<mode>">,
172-
HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Use', 'Off'.">,
172+
HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Off'.">,
173173
Group<grp_general>;
174174
def: Joined<["--", "-"], "reproducer=">, Alias<reproducer>;
175175

@@ -179,7 +179,7 @@ def gen_reproducer: F<"gen-reproducer">,
179179

180180
def use_reproducer: Separate<["--", "-"], "use-reproducer">,
181181
MetaVarName<"<path>">,
182-
HelpText<"Use the object files from the given reproducer path. Alias for --reproducer=Use.">,
182+
HelpText<"Use the object files from the given reproducer path.">,
183183
Group<grp_general>;
184184
def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
185185

llvm/tools/dsymutil/dsymutil.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,12 @@ static Expected<ReproducerMode> getReproducerMode(opt::InputArgList &Args) {
250250
return ReproducerMode::GenerateOnExit;
251251
if (S == "GenerateOnCrash")
252252
return ReproducerMode::GenerateOnCrash;
253-
if (S == "Use")
254-
return ReproducerMode::Use;
255253
if (S == "Off")
256254
return ReproducerMode::Off;
257255
return make_error<StringError>(
258256
"invalid reproducer mode: '" + S +
259257
"'. Supported values are 'GenerateOnExit', 'GenerateOnCrash', "
260-
"'Use', 'Off'.",
258+
"'Off'.",
261259
inconvertibleErrorCode());
262260
}
263261
return ReproducerMode::GenerateOnCrash;
@@ -613,7 +611,7 @@ int main(int argc, char **argv) {
613611

614612
auto OptionsOrErr = getOptions(Args);
615613
if (!OptionsOrErr) {
616-
WithColor::error() << toString(OptionsOrErr.takeError());
614+
WithColor::error() << toString(OptionsOrErr.takeError()) << '\n';
617615
return EXIT_FAILURE;
618616
}
619617

@@ -627,7 +625,7 @@ int main(int argc, char **argv) {
627625
auto Repro = Reproducer::createReproducer(Options.ReproMode,
628626
Options.ReproducerPath, argc, argv);
629627
if (!Repro) {
630-
WithColor::error() << toString(Repro.takeError());
628+
WithColor::error() << toString(Repro.takeError()) << '\n';
631629
return EXIT_FAILURE;
632630
}
633631

0 commit comments

Comments
 (0)