This is an archive of the discontinued LLVM Phabricator instance.

Move VersionTuple from clang/Basic to llvm/Support, llvm part
ClosedPublic

Authored by labath on Jun 7 2018, 8:29 AM.

Details

Summary

This kind of functionality is useful to other project apart from clang.
LLDB works with version numbers a lot, but it does not have a convenient
abstraction for this. Moving this class to a lower level library allows
it to be freely used within LLDB.

The code is an identical copy of the version from clang (apart from
namespace change and re-clang-formatting).

I didn't find any tests specific for this class, so I wrote a couple of
quick ones for the more interesting bits of functionality.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Jun 7 2018, 8:29 AM

It would be better if you're using a monorepo, that way both parts can just be one single patch.

labath added a comment.Jun 7 2018, 8:40 AM

Yea, one day I'll have to try that out. I'm just putting it off cause it would nuke all my branches and build folders :/

FWIW, the llvm part can actually be committed without breaking clang or anyone.

erik.pilkington accepted this revision.Jun 8 2018, 6:21 AM

LGTM, thanks for adding the test!

This revision is now accepted and ready to land.Jun 8 2018, 6:21 AM
This revision was automatically updated to reflect the committed changes.
cfe/trunk/lib/Basic/ObjCRuntime.cpp