diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-03-29 21:22:14 -0400 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-03-30 11:54:24 +0300 |
| commit | 0543def52f5ec2d76dc415da2546e478af491ac3 (patch) | |
| tree | cd08fe58ac0bf9f030a9f079ad5dff2ab1d0f002 /src/zig_llvm.cpp | |
| parent | ff97bd21c3b6a5079f33ff389da0716a12806e29 (diff) | |
| download | zig-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.cpp | 4 |
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)); } |
