aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_debug.cpp
diff options
context:
space:
mode:
authorWes Hardee <weshardee@gmail.com>2022-07-09 18:09:21 -0500
committerGitHub <noreply@github.com>2022-07-09 18:09:21 -0500
commit00739bf06dc73a88a320baec01a3844fbf9f59a9 (patch)
tree157cca02510cd90f6c092ae99c50056342bc7532 /src/llvm_backend_debug.cpp
parent23842a8950be99afca4f4180aca95a7c2da771dc (diff)
parente8148055ad78489832c55aab9b81edd694440d63 (diff)
Merge branch 'odin-lang:master' into master
Diffstat (limited to 'src/llvm_backend_debug.cpp')
-rw-r--r--src/llvm_backend_debug.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/llvm_backend_debug.cpp b/src/llvm_backend_debug.cpp
index b91f32bfc..45a868581 100644
--- a/src/llvm_backend_debug.cpp
+++ b/src/llvm_backend_debug.cpp
@@ -419,7 +419,18 @@ LLVMMetadataRef lb_debug_type_internal(lbModule *m, Type *type) {
break;
case Type_SimdVector:
- return LLVMDIBuilderCreateVectorType(m->debug_builder, cast(unsigned)type->SimdVector.count, 8*cast(unsigned)type_align_of(type), lb_debug_type(m, type->SimdVector.elem), nullptr, 0);
+ {
+ LLVMMetadataRef elem = lb_debug_type(m, type->SimdVector.elem);
+ LLVMMetadataRef subscripts[1] = {};
+ subscripts[0] = LLVMDIBuilderGetOrCreateSubrange(m->debug_builder,
+ 0ll,
+ type->SimdVector.count
+ );
+ return LLVMDIBuilderCreateVectorType(
+ m->debug_builder,
+ 8*cast(unsigned)type_size_of(type), 8*cast(unsigned)type_align_of(type),
+ elem, subscripts, gb_count_of(subscripts));
+ }
case Type_RelativePointer: {
LLVMMetadataRef base_integer = lb_debug_type(m, type->RelativePointer.base_integer);