OSDN Git Service

Move VersionTuple from clang/Basic to llvm/Support
authorPavel Labath <labath@google.com>
Mon, 11 Jun 2018 10:28:04 +0000 (10:28 +0000)
committerPavel Labath <labath@google.com>
Mon, 11 Jun 2018 10:28:04 +0000 (10:28 +0000)
commit802e2f30e4a25dbfbbdf754aabffe79c52606989
tree20aa23d1aa4a38dd37435d57c65e8a8f6e22569a
parent8a8a7292421c3113b0d99b938e9d4688d684fb5e
Move VersionTuple from clang/Basic to llvm/Support

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.

Since this class is used in a lot of places in clang, and it used to be
in the clang namespace, it seemed appropriate to add it to the list of
adopted classes in LLVM.h to avoid prefixing all uses with "llvm::".

Also, 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.

Reviewers: zturner, erik.pilkington

Subscribers: mgorny, cfe-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D47887

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334399 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/VersionTuple.h [new file with mode: 0644]
lib/Support/CMakeLists.txt
lib/Support/VersionTuple.cpp [new file with mode: 0644]
unittests/Support/CMakeLists.txt
unittests/Support/VersionTupleTest.cpp [new file with mode: 0644]