[PATCH] D110325: [llvm] Remove conditional checking for macosx 10.5

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 05:52:34 PDT 2021


ldionne created this revision.
ldionne added a reviewer: benlangmuir.
Herald added subscribers: dexonsmith, hiraditya.
ldionne requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Back-deploying to macOS 10.5 is not supported anymore, so I don't think
anybody's really using that code path. Removing the conditional logic
allows for a small code simplification.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110325

Files:
  llvm/lib/Support/LockFileManager.cpp


Index: llvm/lib/Support/LockFileManager.cpp
===================================================================
--- llvm/lib/Support/LockFileManager.cpp
+++ llvm/lib/Support/LockFileManager.cpp
@@ -35,13 +35,7 @@
 #include <unistd.h>
 #endif
 
-#if defined(__APPLE__) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (__MAC_OS_X_VERSION_MIN_REQUIRED > 1050)
-#define USE_OSX_GETHOSTUUID 1
-#else
-#define USE_OSX_GETHOSTUUID 0
-#endif
-
-#if USE_OSX_GETHOSTUUID
+#if defined(__APPLE__)
 #include <uuid/uuid.h>
 #endif
 
@@ -83,7 +77,7 @@
 static std::error_code getHostID(SmallVectorImpl<char> &HostID) {
   HostID.clear();
 
-#if USE_OSX_GETHOSTUUID
+#if defined(__APPLE__)
   // On OS X, use the more stable hardware UUID instead of hostname.
   struct timespec wait = {1, 0}; // 1 second.
   uuid_t uuid;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110325.374519.patch
Type: text/x-patch
Size: 806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210923/c48887af/attachment.bin>


More information about the llvm-commits mailing list