| author | |
| committer | |
| log | d974afde1d366a28f1b07bff6ebfb5c5756d3b61 |
| tree | d4f1d395dcb8ee11bfe5235dbc4673ad9566c102 |
| parent | f32f7a937fa7150aaba450b1282bba9f01918807 |
| signature | Commit is signed but in an unrecognized format. |
3 files changed, 7 insertions(+), 6 deletions(-)
src/analyze.cpp+3-2| ... | ... | @@ -4486,8 +4486,9 @@ ZigType *get_vector_type(CodeGen *g, uint32_t len, ZigType *elem_type) { |
| 4486 | 4486 | buf_resize(&entry->name, 0); |
| 4487 | 4487 | buf_appendf(&entry->name, "@Vector(%u, %s)", len, buf_ptr(&elem_type->name)); |
| 4488 | 4488 | |
| 4489 | entry->di_type = ZigLLVMDIBuilderCreateVectorType(g->dbuilder, len, | |
| 4490 | LLVMABIAlignmentOfType(g->target_data_ref, entry->type_ref), elem_type->di_type); | |
| 4489 | entry->di_type = ZigLLVMDIBuilderCreateVectorType(g->dbuilder, | |
| 4490 | len * type_size_bits(g, elem_type), | |
| 4491 | LLVMABIAlignmentOfType(g->target_data_ref, entry->type_ref), elem_type->di_type, len); | |
| 4491 | 4492 | |
| 4492 | 4493 | g->type_table.put(type_id, entry); |
| 4493 | 4494 | return entry; |
src/zig_llvm.cpp+3-3| ... | ... | @@ -264,12 +264,12 @@ ZigLLVMDIType *ZigLLVMCreateDebugBasicType(ZigLLVMDIBuilder *dibuilder, const ch |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | struct ZigLLVMDIType *ZigLLVMDIBuilderCreateVectorType(struct ZigLLVMDIBuilder *dibuilder, |
| 267 | uint64_t Size, uint32_t AlignInBits, struct ZigLLVMDIType *Ty) | |
| 267 | uint64_t SizeInBits, uint32_t AlignInBits, struct ZigLLVMDIType *Ty, uint32_t elem_count) | |
| 268 | 268 | { |
| 269 | 269 | SmallVector<Metadata *, 1> subrange; |
| 270 | subrange.push_back(reinterpret_cast<DIBuilder*>(dibuilder)->getOrCreateSubrange(0, Size)); | |
| 270 | subrange.push_back(reinterpret_cast<DIBuilder*>(dibuilder)->getOrCreateSubrange(0, elem_count)); | |
| 271 | 271 | DIType *di_type = reinterpret_cast<DIBuilder*>(dibuilder)->createVectorType( |
| 272 | Size, | |
| 272 | SizeInBits, | |
| 273 | 273 | AlignInBits, |
| 274 | 274 | reinterpret_cast<DIType*>(Ty), |
| 275 | 275 | reinterpret_cast<DIBuilder*>(dibuilder)->getOrCreateArray(subrange)); |
src/zig_llvm.h+1-1| ... | ... | @@ -192,7 +192,7 @@ ZIG_EXTERN_C struct ZigLLVMDISubprogram *ZigLLVMCreateFunction(struct ZigLLVMDIB |
| 192 | 192 | unsigned scope_line, unsigned flags, bool is_optimized, struct ZigLLVMDISubprogram *decl_subprogram); |
| 193 | 193 | |
| 194 | 194 | ZIG_EXTERN_C struct ZigLLVMDIType *ZigLLVMDIBuilderCreateVectorType(struct ZigLLVMDIBuilder *dibuilder, |
| 195 | uint64_t Size, uint32_t AlignInBits, struct ZigLLVMDIType *Ty); | |
| 195 | uint64_t SizeInBits, uint32_t AlignInBits, struct ZigLLVMDIType *Ty, uint32_t elem_count); | |
| 196 | 196 | |
| 197 | 197 | ZIG_EXTERN_C void ZigLLVMFnSetSubprogram(LLVMValueRef fn, struct ZigLLVMDISubprogram *subprogram); |
| 198 | 198 |