[all-commits] [llvm/llvm-project] c09679: [CodeGen] Prevent nullptr deref in genAlternativeC...
Felipe de Azevedo Piovezan via All-commits
all-commits at lists.llvm.org
Wed Mar 8 10:41:59 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c0967995d254fd2dd24ba74afa46df5f559f11ba
https://github.com/llvm/llvm-project/commit/c0967995d254fd2dd24ba74afa46df5f559f11ba
Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M llvm/lib/CodeGen/TargetInstrInfo.cpp
Log Message:
-----------
[CodeGen] Prevent nullptr deref in genAlternativeCodeSequence
A pointer dereference was added (D141302) above an assert that checks
whether the pointer is null. This commit moves the assert above the
dereference and transforms it into an llvm_unreachable to better express
the intent that certain switch cases should never be reached.
Differential Revision: https://reviews.llvm.org/D145599
More information about the All-commits
mailing list