[Lldb-commits] [lldb] r345278 - Get rid of casts. (NFC)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 25 09:15:17 PDT 2018


Author: adrian
Date: Thu Oct 25 09:15:17 2018
New Revision: 345278

URL: http://llvm.org/viewvc/llvm-project?rev=345278&view=rev
Log:
Get rid of casts. (NFC)

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

Modified:
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h

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=345278&r1=345277&r2=345278&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Thu Oct 25 09:15:17 2018
@@ -1402,10 +1402,10 @@ bool PlatformDarwin::SDKSupportsModules(
   if (last_path_component) {
     const llvm::StringRef sdk_name = last_path_component.GetStringRef();
 
-    if (!sdk_name.startswith(sdk_strings[(int)desired_type]))
+    if (!sdk_name.startswith(sdk_strings[desired_type]))
       return false;
     auto version_part =
-        sdk_name.drop_front(strlen(sdk_strings[(int)desired_type]));
+        sdk_name.drop_front(strlen(sdk_strings[desired_type]));
     version_part.consume_back(".sdk");
 
     llvm::VersionTuple version;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h?rev=345278&r1=345277&r2=345278&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h Thu Oct 25 09:15:17 2018
@@ -85,7 +85,7 @@ public:
   static std::tuple<llvm::VersionTuple, llvm::StringRef>
   ParseVersionBuildDir(llvm::StringRef str);
 
-  enum class SDKType {
+  enum SDKType : unsigned {
     MacOSX = 0,
     iPhoneSimulator,
     iPhoneOS,




More information about the lldb-commits mailing list