OSDN Git Service

Try to appease the FreeBSD bots.
authorZachary Turner <zturner@google.com>
Fri, 3 Mar 2017 17:56:14 +0000 (17:56 +0000)
committerZachary Turner <zturner@google.com>
Fri, 3 Mar 2017 17:56:14 +0000 (17:56 +0000)
pthread_self() returns a pthread_t, but we were setting it to
an int.  It seems the cast to int when calling sysctl is still
the correct thing to do, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296892 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Unix/Threading.inc

index 232b1db..e1a37cc 100644 (file)
@@ -127,9 +127,9 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #if defined(__FreeBSD_kernel__)
-  int pid = ::pthread_self();
+  auto pid = ::pthread_self();
 #else
-  int pid = ::getpid();
+  auto pid = ::getpid();
 #endif
 
   int tid = ::pthread_getthreadid_np();