mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-28 13:51:09 +00:00
[MemorySSA] Assert defining access is not a MemoryUse.
This commit is contained in:
parent
e6870b67d6
commit
ee5e19fe38
@ -1726,8 +1726,11 @@ MemoryUseOrDef *MemorySSA::createDefinedAccess(Instruction *I,
|
||||
if (CreationMustSucceed)
|
||||
assert(NewAccess != nullptr && "Tried to create a memory access for a "
|
||||
"non-memory touching instruction");
|
||||
if (NewAccess)
|
||||
if (NewAccess) {
|
||||
assert((!Definition || !isa<MemoryUse>(Definition)) &&
|
||||
"A use cannot be a defining access");
|
||||
NewAccess->setDefiningAccess(Definition);
|
||||
}
|
||||
return NewAccess;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user