[Lldb-commits] [lldb] r335247 - Fix macos build for r335244

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 21 08:40:33 PDT 2018


Author: labath
Date: Thu Jun 21 08:40:33 2018
New Revision: 335247

URL: http://llvm.org/viewvc/llvm-project?rev=335247&view=rev
Log:
Fix macos build for r335244

I've made the code accept only 16 byte UUIDs, which is technically not
NFC (previously it would also accept 20 byte ones, but use only the
first 16 bytes), but this should be more correct as mac UUIDs are always
16 byte long.

Modified:
    lldb/trunk/source/Host/macosx/Symbols.cpp

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=335247&r1=335246&r2=335247&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Thu Jun 21 08:40:33 2018
@@ -76,8 +76,8 @@ int LocateMacOSXFilesUsingDebugSymbols(c
 
   if (uuid && uuid->IsValid()) {
     // Try and locate the dSYM file using DebugSymbols first
-    const UInt8 *module_uuid = (const UInt8 *)uuid->GetBytes();
-    if (module_uuid != NULL) {
+    llvm::ArrayRef<uint8_t> module_uuid = uuid->GetBytes();
+    if (module_uuid.size() == 16) {
       CFCReleaser<CFUUIDRef> module_uuid_ref(::CFUUIDCreateWithBytes(
           NULL, module_uuid[0], module_uuid[1], module_uuid[2], module_uuid[3],
           module_uuid[4], module_uuid[5], module_uuid[6], module_uuid[7],




More information about the lldb-commits mailing list