This is an archive of the discontinued LLVM Phabricator instance.

Delete Default and JITDefault code models
ClosedPublic

Authored by rafael on Aug 2 2017, 2:12 PM.

Details

Reviewers
davide
Summary

IMHO it is an antipattern to have a enum value that is Default.

At any given piece of code it is not clear if we have to handle Default or if has already been mapped to a concrete value. In this case in particular, only the target can do the mapping and it is nice to make sure it is always done.

This deletes the two default enum values of CodeModel and uses an explicit Optional<CodeModel> when it is possible that it is unspecified.

Diff Detail

Event Timeline

rafael created this revision.Aug 2 2017, 2:12 PM
davide accepted this revision.Aug 2 2017, 5:45 PM

LGTM, thanks!

This revision is now accepted and ready to land.Aug 2 2017, 5:45 PM
rafael closed this revision.Aug 2 2017, 7:21 PM