BlockGenerator: Assert that we do not get alloca of array access

llvm-svn: 277698
This commit is contained in:
Tobias Grosser 2016-08-04 06:55:53 +00:00
parent 576932728d
commit 3216f8546c

View File

@ -363,6 +363,8 @@ Value *BlockGenerator::getOrCreateAlloca(Value *ScalarBase,
}
Value *BlockGenerator::getOrCreateAlloca(const MemoryAccess &Access) {
assert(!Access.isArrayKind() && "Trying to get alloca for array kind");
if (Access.isPHIKind())
return getOrCreatePHIAlloca(Access.getBaseAddr());
else
@ -370,6 +372,8 @@ Value *BlockGenerator::getOrCreateAlloca(const MemoryAccess &Access) {
}
Value *BlockGenerator::getOrCreateAlloca(const ScopArrayInfo *Array) {
assert(!Array->isArrayKind() && "Trying to get alloca for array kind");
if (Array->isPHIKind())
return getOrCreatePHIAlloca(Array->getBasePtr());
else