mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-09 09:01:25 +00:00
BasicAA: Uninserted instructions have no parent, and notDifferentParent explicitly allows for this case, but getParent crashes when handed one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303442 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
04150ba0ac
commit
a55349e67c
@ -683,8 +683,11 @@ static bool isIntrinsicCall(ImmutableCallSite CS, Intrinsic::ID IID) {
|
||||
|
||||
#ifndef NDEBUG
|
||||
static const Function *getParent(const Value *V) {
|
||||
if (const Instruction *inst = dyn_cast<Instruction>(V))
|
||||
if (const Instruction *inst = dyn_cast<Instruction>(V)) {
|
||||
if (!inst->getParent())
|
||||
return nullptr;
|
||||
return inst->getParent()->getParent();
|
||||
}
|
||||
|
||||
if (const Argument *arg = dyn_cast<Argument>(V))
|
||||
return arg->getParent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user