| author | |
| committer | |
| log | 18f05664dcf9c3a307d269dda4f146bafbca19e9 |
| tree | 40ca1cd54bf9a3a4be38496bb9d52355366d03eb |
| parent | e96f65db7735ef80e19253ec25a1ce31751650f1 |
Fixes the following assertion:
```
zig: llvm/lib/IR/Type.cpp:729: static llvm::PointerType* llvm::PointerType::get(llvm::Type*, unsigned int): Assertion `isValidElementType(EltTy) && "Invalid type for pointer element!"' failed.
```1 files changed, 1 insertions(+), 1 deletions(-)
src/codegen/llvm.zig+1-1| ... | @@ -4125,7 +4125,7 @@ pub const DeclGen = struct { | ... | @@ -4125,7 +4125,7 @@ pub const DeclGen = struct { |
| 4125 | else => unreachable, | 4125 | else => unreachable, |
| 4126 | }; | 4126 | }; |
| 4127 | if (bitcast_needed) { | 4127 | if (bitcast_needed) { |
| 4128 | return llvm_ptr.constBitCast((try dg.lowerType(ptr_child_ty)).pointerType(0)); | 4128 | return llvm_ptr.constBitCast((try dg.lowerPtrElemTy(ptr_child_ty)).pointerType(0)); |
| 4129 | } else { | 4129 | } else { |
| 4130 | return llvm_ptr; | 4130 | return llvm_ptr; |
| 4131 | } | 4131 | } |