Fix crash in ObjC codegen introduced with 5ab6ee75
5ab6ee75 assumed that if `RValue::isScalar()` returns true then `RValue::getScalarVal` will return a valid value. This is not the case when the return value is `void` and so void message returns would crash if they hit this path. This is triggered only for cases where the nil-handling path needs to do something non-trivial (destroy arguments that should be consumed by the callee). Reviewed By: triplef Differential Revision: https://reviews.llvm.org/D123898
Loading
Please sign in to comment