This is an archive of the discontinued LLVM Phabricator instance.

[dsymutil] Disallow --reproducer=Use
ClosedPublic

Authored by keith on Apr 3 2023, 9:54 PM.

Details

Summary

This should be implied by --use-reproducer instead as a path is required
for this mode

Diff Detail

Event Timeline

keith created this revision.Apr 3 2023, 9:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 9:54 PM
keith requested review of this revision.Apr 3 2023, 9:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 9:54 PM

I'm wondering if we shouldn't just hide the Use mode from the user and make that an implementation detail. The help string for the --reproducer option already says:

Specify the reproducer generation mode.

Limiting the option to /generation/ modes (GenerateOnExit, GenerateOnCrash and Off) makes sense to me conceptually.

The help string for --use-reproducer is also wrong:

Use the object files from the given reproducer path. Alias for --reproducer=Use.

The flag is not an alias but rather implies --reproducer=Use which could be an implementation detail.

keith updated this revision to Diff 510851.Apr 4 2023, 10:30 AM

Disallow Use reproducer mode

keith added a comment.Apr 4 2023, 10:30 AM

Yea I wondered the same thing but went with the initial approach since it was in the help doc. Changed to just disallow that value instead

keith retitled this revision from [dsymutil] Improve error with invalid reproducer args to [dsymutil] Disallow --reproducer=Use.Apr 4 2023, 10:31 AM
keith edited the summary of this revision. (Show Details)
JDevlieghere accepted this revision.Apr 4 2023, 10:58 AM

Thanks, this LGTM!

This revision is now accepted and ready to land.Apr 4 2023, 10:58 AM
This revision was landed with ongoing or failed builds.Apr 4 2023, 11:47 AM
This revision was automatically updated to reflect the committed changes.