llvm: fix crashes when loading a struct field
The result of buildStructGEP is not always a GEP (sorry), so we can't use getGEPResultElementType on it. Closes #14641
This commit is contained in:
committed by
Veikka Tuominen
parent
ff97bd21c3
commit
0543def52f
@@ -1239,10 +1239,6 @@ void ZigLLVMSetCallElemTypeAttr(LLVMValueRef Call, size_t arg_index, LLVMTypeRef
|
||||
Attribute::get(call_inst->getContext(), Attribute::ElementType, llvm_type));
|
||||
}
|
||||
|
||||
LLVMTypeRef ZigLLVMGetGEPResultElementType(LLVMValueRef GEP) {
|
||||
return wrap(unwrap<GEPOperator>(GEP)->getResultElementType());
|
||||
}
|
||||
|
||||
void ZigLLVMFunctionSetPrefixData(LLVMValueRef function, LLVMValueRef data) {
|
||||
unwrap<Function>(function)->setPrefixData(unwrap<Constant>(data));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user