This is an archive of the discontinued LLVM Phabricator instance.

Report an error for an unknown -z option.
ClosedPublic

Authored by ruiu on Jun 26 2018, 11:28 PM.

Event Timeline

ruiu created this revision.Jun 26 2018, 11:28 PM
grimar accepted this revision.Jun 27 2018, 12:21 AM

Well, if you're OK with such straightforward approach, I have no objections either. Its indeed simplest way probably. LGTM.

This revision is now accepted and ready to land.Jun 27 2018, 12:21 AM
ruiu added a comment.Jun 27 2018, 12:25 AM

The problem of doing an error check this way is, when it is easy to make the list inconsistent you remove an -z option support. However, that's not a real concern because we can't remove any -z option once it is implemented and released. So this simple way should suffice.

This revision was automatically updated to reflect the committed changes.

The problem of doing an error check this way is, when it is easy to make the list inconsistent you remove an -z option support. However, that's not a real concern because we can't remove any -z option once it is implemented and released. So this simple way should suffice.

Yeah, speaking honestly my approach felt a bit tricky to me. But I was not sure that dumb way (which is first that comes to mind) is acceptable either. I think I am happy with it.