aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2020-01-23 10:24:10 -0800
committerJustin Bogner <mail@justinbogner.com>2020-01-23 10:36:39 -0800
commitb81a337be7bcc84b2ab052103ce918c9fbfc839a (patch)
treefda7652207ed65f115ee07343d10e96fa8f9b213 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent3c545e4b7318c337bed43d5bc76aad040565f1ef (diff)
downloadllvm-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