[all-commits] [llvm/llvm-project] 94c3b1: Fix crash in ObjC codegen introduced with 5ab6ee75...
David Chisnall via All-commits
all-commits at lists.llvm.org
Sun Jul 24 06:02:10 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 94c3b169785c0a0ae650c724dcf2c22ff65f5e24
https://github.com/llvm/llvm-project/commit/94c3b169785c0a0ae650c724dcf2c22ff65f5e24
Author: David Chisnall <github at theravensnest.org>
Date: 2022-07-24 (Sun, 24 Jul 2022)
Changed paths:
M clang/lib/CodeGen/CGObjCGNU.cpp
A clang/test/CodeGenObjC/gnustep2-nontrivial-destructor-argument.mm
Log Message:
-----------
Fix crash in ObjC codegen introduced with 5ab6ee75994d645725264e757d67bbb1c96fb2b6
5ab6ee75994d645725264e757d67bbb1c96fb2b6 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
More information about the All-commits
mailing list