diff options
| author | Sean Callanan <scallanan@apple.com> | 2017-04-26 20:36:47 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2017-04-26 20:36:47 +0000 |
| commit | 5652d5eb097490ee96c79a9e0b952736c8e49f91 (patch) | |
| tree | 3040f079e85c55f7fbca8fbf5cd616cabccc990b | |
| parent | 3e519b949b19aaf8fa91f7ab5b2c76ccb16a2433 (diff) | |
| download | bcm5719-llvm-5652d5eb097490ee96c79a9e0b952736c8e49f91.tar.gz bcm5719-llvm-5652d5eb097490ee96c79a9e0b952736c8e49f91.zip | |
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>
llvm-svn: 301461
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp index 07b4ae5e0ad..e99fd74a352 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp @@ -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( |

