[Lldb-commits] [lldb] r334399 - Move VersionTuple from clang/Basic to llvm/Support
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 11 03:28:04 PDT 2018
Author: labath
Date: Mon Jun 11 03:28:04 2018
New Revision: 334399
URL: http://llvm.org/viewvc/llvm-project?rev=334399&view=rev
Log:
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
Modified:
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=334399&r1=334398&r2=334399&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Mon Jun 11 03:28:04 2018
@@ -16,8 +16,6 @@
#include <algorithm>
#include <mutex>
-// Other libraries and framework includes
-#include "clang/Basic/VersionTuple.h"
// Project includes
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Breakpoint/BreakpointSite.h"
@@ -42,6 +40,7 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Threading.h"
+#include "llvm/Support/VersionTuple.h"
#if defined(__APPLE__)
#include <TargetConditionals.h> // for TARGET_OS_TV, TARGET_OS_WATCH
@@ -1612,19 +1611,19 @@ void PlatformDarwin::AddClangModuleCompi
case SDKType::iPhoneOS:
minimum_version_option.PutCString("-mios-version-min=");
minimum_version_option.PutCString(
- clang::VersionTuple(versions[0], versions[1], versions[2])
+ llvm::VersionTuple(versions[0], versions[1], versions[2])
.getAsString());
break;
case SDKType::iPhoneSimulator:
minimum_version_option.PutCString("-mios-simulator-version-min=");
minimum_version_option.PutCString(
- clang::VersionTuple(versions[0], versions[1], versions[2])
+ llvm::VersionTuple(versions[0], versions[1], versions[2])
.getAsString());
break;
case SDKType::MacOSX:
minimum_version_option.PutCString("-mmacosx-version-min=");
minimum_version_option.PutCString(
- clang::VersionTuple(versions[0], versions[1], versions[2])
+ llvm::VersionTuple(versions[0], versions[1], versions[2])
.getAsString());
}
options.push_back(minimum_version_option.GetString());
More information about the lldb-commits
mailing list