[clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

Summary:
OSSpinLock* are Apple/Darwin functions, but were previously located with ObjC checks as those were most closely tied to Apple platforms before.

Now that there's a specific Darwin module, relocating the check there.

This change was prepared by running rename_check.py.

Contributed By: mwyman

Reviewers: stephanemoore, dmaclach

Reviewed By: stephanemoore

Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits

Tags: #clang-tools-extra, #clang, #llvm

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

llvm-svn: 373392
diff --git a/clang-tools-extra/clang-tidy/darwin/DarwinTidyModule.cpp b/clang-tools-extra/clang-tidy/darwin/DarwinTidyModule.cpp
index 5c10cdf..d11ef1f 100644
--- a/clang-tools-extra/clang-tidy/darwin/DarwinTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/darwin/DarwinTidyModule.cpp
@@ -9,6 +9,7 @@
 #include "../ClangTidy.h"
 #include "../ClangTidyModule.h"
 #include "../ClangTidyModuleRegistry.h"
+#include "AvoidSpinlockCheck.h"
 #include "DispatchOnceNonstaticCheck.h"
 
 namespace clang {
@@ -18,6 +19,8 @@
 class DarwinModule : public ClangTidyModule {
 public:
   void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
+    CheckFactories.registerCheck<AvoidSpinlockCheck>(
+        "darwin-avoid-spinlock");
     CheckFactories.registerCheck<DispatchOnceNonstaticCheck>(
         "darwin-dispatch-once-nonstatic");
   }