diff options
author | Justin Bogner <mail@justinbogner.com> | 2020-01-23 10:24:10 -0800 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2020-01-23 10:36:39 -0800 |
commit | b81a337be7bcc84b2ab052103ce918c9fbfc839a (patch) | |
tree | fda7652207ed65f115ee07343d10e96fa8f9b213 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 3c545e4b7318c337bed43d5bc76aad040565f1ef (diff) | |
download | llvm-b81a337be7bcc84b2ab052103ce918c9fbfc839a.zip llvm-b81a337be7bcc84b2ab052103ce918c9fbfc839a.tar.gz llvm-b81a337be7bcc84b2ab052103ce918c9fbfc839a.tar.bz2 |
[LoopUnroll] Avoid UB when converting from WeakVH to `Value *`
Calling `operator*` on a WeakVH with a null value yields a null
reference, which is UB. Avoid this by implicitly converting the WeakVH
to a `Value *` rather than dereferencing and then taking the address
for the type conversion.
Differential Revision: https://reviews.llvm.org/D73280
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions