From f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:50:09 +0000 Subject: Vendor import of lldb release_39 branch r276489: https://llvm.org/svn/llvm-project/lldb/branches/release_39@276489 --- source/Host/macosx/ThisThread.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'source/Host/macosx/ThisThread.cpp') diff --git a/source/Host/macosx/ThisThread.cpp b/source/Host/macosx/ThisThread.cpp index 95c7f2bf1e38b..6f1c88f67309f 100644 --- a/source/Host/macosx/ThisThread.cpp +++ b/source/Host/macosx/ThisThread.cpp @@ -10,30 +10,20 @@ #include "lldb/Host/ThisThread.h" #include +#include "llvm/ADT/SmallVector.h" using namespace lldb_private; void ThisThread::SetName(llvm::StringRef name) { -#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 - ::pthread_setname_np(name); +#if defined (__APPLE__) + ::pthread_setname_np(name.str().c_str()); #endif } void ThisThread::GetName(llvm::SmallVectorImpl &name) { -#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 - char pthread_name[1024]; - dispatch_queue_t current_queue = ::dispatch_get_current_queue(); - if (current_queue != NULL) - { - const char *queue_name = dispatch_queue_get_label(current_queue); - if (queue_name && queue_name[0]) - { - name = queue_name; - } - } -#endif + // FIXME - implement this. } -- cgit v1.2.3