Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit a46a5e2

Browse files
committed
Remove getPointerElementType in ConstantIR
1 parent bff6bd4 commit a46a5e2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

omniscidb/QueryEngine/ConstantIR.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ std::vector<llvm::Value*> CodeGenerator::codegenHoistedConstantsLoads(
154154
} else if (type->isArray() && !use_dict_encoding) {
155155
auto off_and_len_ptr = cgen_state_->query_func_entry_ir_builder_.CreateBitCast(
156156
lit_buf_start,
157-
llvm::PointerType::get(get_int_type(32, cgen_state_->context_),
157+
llvm::PointerType::get(cgen_state_->context_,
158158
lit_buf_start->getType()->getPointerAddressSpace()));
159159
// packed offset + length, 16 bits each
160160
auto off_and_len = cgen_state_->query_func_entry_ir_builder_.CreateLoad(
161-
off_and_len_ptr->getType()->getPointerElementType(), off_and_len_ptr);
161+
get_int_type(32, cgen_state_->context_), off_and_len_ptr);
162162
auto off_lv = cgen_state_->query_func_entry_ir_builder_.CreateLShr(
163163
cgen_state_->query_func_entry_ir_builder_.CreateAnd(
164164
off_and_len, cgen_state_->llInt(int32_t(0xffff0000))),
@@ -167,9 +167,7 @@ std::vector<llvm::Value*> CodeGenerator::codegenHoistedConstantsLoads(
167167
off_and_len, cgen_state_->llInt(int32_t(0x0000ffff)));
168168

169169
auto var_start_address = cgen_state_->query_func_entry_ir_builder_.CreateGEP(
170-
lit_buff_query_func_lv->getType()->getScalarType()->getPointerElementType(),
171-
lit_buff_query_func_lv,
172-
off_lv);
170+
get_int_type(8, cgen_state_->context_), lit_buff_query_func_lv, off_lv);
173171
auto var_length = len_lv;
174172

175173
var_start_address->setName(literal_name + "_start_address");

0 commit comments

Comments
 (0)