From 23f59509a8790b04c691ec063c55724a3bfee7eb Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 17 Jul 2012 03:23:13 +0000 Subject: Ran the static analyzer on the codebase and found a few things. llvm-svn: 160338 --- lldb/source/Expression/IRDynamicChecks.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lldb/source/Expression/IRDynamicChecks.cpp') diff --git a/lldb/source/Expression/IRDynamicChecks.cpp b/lldb/source/Expression/IRDynamicChecks.cpp index 0c0c786ecef..02006bb2414 100644 --- a/lldb/source/Expression/IRDynamicChecks.cpp +++ b/lldb/source/Expression/IRDynamicChecks.cpp @@ -461,11 +461,16 @@ private: case eMsgSend_stret: target_object = call_inst->getArgOperand(1); selector = call_inst->getArgOperand(2); + break; case eMsgSendSuper: case eMsgSendSuper_stret: return true; } - + + // These objects should always be valid according to Sean Calannan + assert (target_object); + assert (selector); + // Insert an instruction to cast the receiver id to int8_t* BitCastInst *bit_cast = new BitCastInst(target_object, -- cgit v1.2.3