aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-03-28 14:26:24 +0200
committerNikita Popov <npopov@redhat.com>2022-03-28 14:28:47 +0200
commitdb561064f60dff6c65e9b31c709cfbd72dd24b73 (patch)
tree9476682b87cf0ba18c112c3b309ec6bb510d30de /llvm/lib/IR/Module.cpp
parent534b228313409a781060856d6cb6c2e9523cba5b (diff)
downloadllvm-db561064f60dff6c65e9b31c709cfbd72dd24b73.zip
llvm-db561064f60dff6c65e9b31c709cfbd72dd24b73.tar.gz
llvm-db561064f60dff6c65e9b31c709cfbd72dd24b73.tar.bz2
[GlobalOpt] Handle non-instruction MTI source (PR54572)
This was reusing a cast to GlobalVariable to check for an Instruction, which means we'll try to dereference a null pointer if it's not actually a GlobalVariable. We should be casting MTI->getSource() instead. I don't think this problem is really specific to opaque pointers, but it certainly makes it a lot easier to reproduce. Fixes https://github.com/llvm/llvm-project/issues/54572.
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions