Skip to content

Commit 0377021

Browse files
committed
LLVMBuildUtils: Set integer info in getListItemIndex()
1 parent 6499127 commit 0377021

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/engine/internal/llvm/llvmbuildutils.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,10 +991,13 @@ llvm::Value *LLVMBuildUtils::getListItemIndex(const LLVMListPtr &listPtr, Compil
991991
m_builder.CreateCondBr(cond, bodyBlock, notFoundBlock);
992992

993993
// if (list[index] == item)
994+
// TODO: Add integer support for lists
994995
m_builder.SetInsertPoint(bodyBlock);
995996
LLVMRegister currentItem(listType);
996997
currentItem.isRawValue = false;
997998
currentItem.value = getListItem(listPtr, m_builder.CreateLoad(m_builder.getInt64Ty(), index));
999+
currentItem.isInt = m_builder.getInt1(false);
1000+
currentItem.intValue = llvm::ConstantInt::get(m_builder.getInt64Ty(), 0, true);
9981001
llvm::Value *cmp = createComparison(&currentItem, item, Comparison::EQ);
9991002
m_builder.CreateCondBr(cmp, cmpIfBlock, cmpElseBlock);
10001003

0 commit comments

Comments
 (0)