Author: spyffe
Date: Wed Apr 26 15:36:47 2017
New Revision: 301461

URL: http://llvm.org/viewvc/llvm-project?rev=301461&view=rev
Log:
Fixed a crash when dealing with an empty method name in the ObjC runtime.
I've filed a bug covering better unit testing of our runtime metadata reader, 
which will allow this to be testable.. 

<rdar://problem/31793264>

Modified:
    
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp?rev=301461&r1=301460&r2=301461&view=diff
==============================================================================
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
 Wed Apr 26 15:36:47 2017
@@ -355,9 +355,14 @@ public:
       }
     }
 
+    clang::IdentifierInfo **identifier_infos = selector_components.data();
+    if (!identifier_infos) {
+      return NULL;
+    }
+
     clang::Selector sel = ast_ctx.Selectors.getSelector(
         is_zero_argument ? 0 : selector_components.size(),
-        selector_components.data());
+        identifier_infos);
 
     clang::QualType ret_type =
         ClangUtil::GetQualType(type_realizer_sp->RealizeType(


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to