Author: spyffe Date: Thu Dec 1 13:14:55 2016 New Revision: 288403 URL: http://llvm.org/viewvc/llvm-project?rev=288403&view=rev Log: Handle empty strings when looking for a CFString's encoding. Should fix the bots.
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=288403&r1=288402&r2=288403&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Thu Dec 1 13:14:55 2016 @@ -500,7 +500,7 @@ bool IRForTarget::RewriteObjCConstString Constant *numBytes_arg = ConstantInt::get( m_intptr_ty, cstr ? (string_array->getNumElements() - 1) * string_array->getElementByteSize() : 0, false); int encoding_flags = 0; - switch (string_array->getElementByteSize()) { + switch (cstr ? string_array->getElementByteSize() : 1) { case 1: encoding_flags = 0x08000100; /* 0x08000100 is kCFStringEncodingUTF8 */ break; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits