aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-03-29 21:22:14 -0400
committerVeikka Tuominen <git@vexu.eu>2023-03-30 11:54:24 +0300
commit0543def52f5ec2d76dc415da2546e478af491ac3 (patch)
treecd08fe58ac0bf9f030a9f079ad5dff2ab1d0f002 /src/zig_llvm.cpp
parentff97bd21c3b6a5079f33ff389da0716a12806e29 (diff)
downloadzig-0543def52f5ec2d76dc415da2546e478af491ac3.tar.gz
zig-0543def52f5ec2d76dc415da2546e478af491ac3.zip
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
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index 4f73bd2c3c..586abf5b04 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -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));
}